running splint on the code.
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
-Iinclude
|
||||||
|
-Idemo/handler
|
||||||
|
-Idemo/object
|
||||||
|
-Iports/linux
|
||||||
|
-castfcnptr
|
||||||
|
-fullinitblock
|
||||||
|
-weak
|
||||||
|
+posixlib
|
||||||
|
-skipposixheaders
|
||||||
|
|
||||||
@@ -25,3 +25,4 @@ O. Convert object methods to use an array of object methods
|
|||||||
P. Convert datalink methods to use function pointers that can be
|
P. Convert datalink methods to use function pointers that can be
|
||||||
overridden in main.c.
|
overridden in main.c.
|
||||||
Q. Create BACnet router code that uses more than one datalink.
|
Q. Create BACnet router code that uses more than one datalink.
|
||||||
|
R. splint the code. Make intelligent fixes.
|
||||||
|
|||||||
@@ -3,11 +3,17 @@
|
|||||||
[ -x /usr/bin/splint ] || exit 0
|
[ -x /usr/bin/splint ] || exit 0
|
||||||
|
|
||||||
INCLUDES="-Iinclude -Idemo/handler -Idemo/object -Iports/linux"
|
INCLUDES="-Iinclude -Idemo/handler -Idemo/object -Iports/linux"
|
||||||
|
SETTINGS="-castfcnptr -fullinitblock -weak +posixlib"
|
||||||
|
|
||||||
|
if [ ! -x .splintrc ]
|
||||||
|
then
|
||||||
|
echo ${INCLUDES} ${SETTINGS} > .splintrc
|
||||||
|
fi
|
||||||
|
|
||||||
directory=${1-`pwd`}
|
directory=${1-`pwd`}
|
||||||
for filename in $( find $directory -name '*.c' )
|
for filename in $( find $directory -name '*.c' )
|
||||||
do
|
do
|
||||||
echo splinting ${filename}
|
echo splinting ${filename}
|
||||||
/usr/bin/splint ${INCLUDES} ${filename}
|
/usr/bin/splint ${filename}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user