Splinted the core source files.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# splint is a static code checker
|
# splint is a static code checker
|
||||||
[ -x /usr/bin/splint ] || exit 0
|
|
||||||
|
SPLINT=/usr/bin/splint
|
||||||
|
|
||||||
|
[ -x ${SPLINT} ] || exit 0
|
||||||
|
|
||||||
INCLUDES="-Iinclude -Iports/linux"
|
INCLUDES="-Iinclude -Iports/linux"
|
||||||
SETTINGS="-castfcnptr -fullinitblock -initallelements -weak +posixlib"
|
SETTINGS="-castfcnptr -fullinitblock -initallelements -weak +posixlib"
|
||||||
@@ -14,6 +17,6 @@ directory=${1-`pwd`}/src
|
|||||||
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 ${filename}
|
${SPLINT} ${filename}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ bool apdu_service_supported(
|
|||||||
/** Function to translate a SERVICE_SUPPORTED_ enum to its SERVICE_CONFIRMED_
|
/** Function to translate a SERVICE_SUPPORTED_ enum to its SERVICE_CONFIRMED_
|
||||||
* or SERVICE_UNCONFIRMED_ index.
|
* or SERVICE_UNCONFIRMED_ index.
|
||||||
* Useful with the bactext_confirmed_service_name() functions.
|
* Useful with the bactext_confirmed_service_name() functions.
|
||||||
*
|
*
|
||||||
* @param service_supported [in] The SERVICE_SUPPORTED_ enum value to convert.
|
* @param service_supported [in] The SERVICE_SUPPORTED_ enum value to convert.
|
||||||
* @param index [out] The SERVICE_CONFIRMED_ or SERVICE_UNCONFIRMED_ index,
|
* @param index [out] The SERVICE_CONFIRMED_ or SERVICE_UNCONFIRMED_ index,
|
||||||
* if found.
|
* if found.
|
||||||
@@ -190,7 +190,7 @@ bool apdu_service_supported_to_index(
|
|||||||
for (i = 0; i < MAX_BACNET_CONFIRMED_SERVICE; i++) {
|
for (i = 0; i < MAX_BACNET_CONFIRMED_SERVICE; i++) {
|
||||||
if (confirmed_service_supported[i] == service_supported) {
|
if (confirmed_service_supported[i] == service_supported) {
|
||||||
found = true;
|
found = true;
|
||||||
*index = i;
|
*index = (size_t)i;
|
||||||
*bIsConfirmed = true;
|
*bIsConfirmed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -201,7 +201,7 @@ bool apdu_service_supported_to_index(
|
|||||||
for (i = 0; i < MAX_BACNET_UNCONFIRMED_SERVICE; i++) {
|
for (i = 0; i < MAX_BACNET_UNCONFIRMED_SERVICE; i++) {
|
||||||
if (unconfirmed_service_supported[i] == service_supported) {
|
if (unconfirmed_service_supported[i] == service_supported) {
|
||||||
found = true;
|
found = true;
|
||||||
*index = i;
|
*index = (size_t)i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -380,7 +380,7 @@ void apdu_handler(
|
|||||||
/* PDU Type */
|
/* PDU Type */
|
||||||
switch (apdu[0] & 0xF0) {
|
switch (apdu[0] & 0xF0) {
|
||||||
case PDU_TYPE_CONFIRMED_SERVICE_REQUEST:
|
case PDU_TYPE_CONFIRMED_SERVICE_REQUEST:
|
||||||
len = apdu_decode_confirmed_service_request(&apdu[0], /* APDU data */
|
len = (int)apdu_decode_confirmed_service_request(&apdu[0],
|
||||||
apdu_len, &service_data, &service_choice, &service_request,
|
apdu_len, &service_data, &service_choice, &service_request,
|
||||||
&service_request_len);
|
&service_request_len);
|
||||||
/* When network communications are completely disabled,
|
/* When network communications are completely disabled,
|
||||||
|
|||||||
Reference in New Issue
Block a user