modified splint script for Makefile usage. - Thanks, Bryan.
This commit is contained in:
@@ -5,18 +5,21 @@ SPLINT=/usr/bin/splint
|
|||||||
|
|
||||||
[ -x ${SPLINT} ] || exit 0
|
[ -x ${SPLINT} ] || exit 0
|
||||||
|
|
||||||
|
DEFINES="-D__signed__=signed -D__gnuc_va_list=va_list"
|
||||||
INCLUDES="-Iinclude -Idemo/object -Iports/linux"
|
INCLUDES="-Iinclude -Idemo/object -Iports/linux"
|
||||||
SETTINGS="-castfcnptr -fullinitblock -initallelements -weak +posixlib"
|
SETTINGS="-castfcnptr -fullinitblock -initallelements -weak -warnposixheaders"
|
||||||
|
|
||||||
if [ ! -x .splintrc ]
|
if [ ! -e .splintrc ]
|
||||||
then
|
then
|
||||||
echo ${INCLUDES} ${SETTINGS} > .splintrc
|
echo ${DEFINES} ${INCLUDES} ${SETTINGS} > .splintrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
directory=${1-`pwd`}/src
|
directory=${1-`pwd`}/src
|
||||||
|
rm -f splint_output.txt
|
||||||
|
touch splint_output.txt
|
||||||
for filename in $( find $directory -name '*.c' )
|
for filename in $( find $directory -name '*.c' )
|
||||||
do
|
do
|
||||||
echo splinting ${filename}
|
echo splinting ${filename}
|
||||||
${SPLINT} ${filename}
|
${SPLINT} ${filename} >> splint_output.txt 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user