Fixed warnings detected by splint

This commit is contained in:
skarg
2017-02-15 21:50:06 +00:00
parent dba03d47bd
commit fa445a1251
4 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ rm -f splint_output.txt
touch splint_output.txt
for filename in $( find $directory -name '*.c' )
do
echo splinting ${filename} >> ${SPLINT_LOGFILE}
echo splinting ${filename}
echo splinting ${filename} >> ${SPLINT_LOGFILE}
${SPLINT} ${filename} >> ${SPLINT_LOGFILE} 2>&1
done
+1 -1
View File
@@ -126,7 +126,7 @@ void address_remove_device(
uint32_t device_id)
{
struct Address_Cache_Entry *pMatch;
int index = 0;
uint32_t index = 0;
pMatch = Address_Cache;
while (pMatch <= &Address_Cache[MAX_ADDRESS_CACHE - 1]) {
+1 -1
View File
@@ -462,7 +462,7 @@ void apdu_handler(
/* PDU Type */
switch (apdu[0] & 0xF0) {
case PDU_TYPE_CONFIRMED_SERVICE_REQUEST:
apdu_decode_confirmed_service_request(&apdu[0],
(void)apdu_decode_confirmed_service_request(&apdu[0],
apdu_len, &service_data, &service_choice, &service_request,
&service_request_len);
if (apdu_confirmed_dcc_disabled(service_choice)) {
+2 -2
View File
@@ -139,7 +139,7 @@ int awf_decode_service_request(
decoded_len =
decode_octet_string(&apdu[len], len_value_type,
&data->fileData[0]);
if (decoded_len != len_value_type) {
if ((uint32_t)decoded_len != len_value_type) {
return -1;
}
len += decoded_len;
@@ -181,7 +181,7 @@ int awf_decode_service_request(
decoded_len =
decode_octet_string(&apdu[len], len_value_type,
&data->fileData[i]);
if (decoded_len != len_value_type) {
if ((uint32_t)decoded_len != len_value_type) {
return -1;
}
len += decoded_len;