Fixed warnings detected by splint
This commit is contained in:
@@ -20,7 +20,8 @@ rm -f splint_output.txt
|
|||||||
touch 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} >> ${SPLINT_LOGFILE}
|
echo splinting ${filename}
|
||||||
|
echo splinting ${filename} >> ${SPLINT_LOGFILE}
|
||||||
${SPLINT} ${filename} >> ${SPLINT_LOGFILE} 2>&1
|
${SPLINT} ${filename} >> ${SPLINT_LOGFILE} 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ void address_remove_device(
|
|||||||
uint32_t device_id)
|
uint32_t device_id)
|
||||||
{
|
{
|
||||||
struct Address_Cache_Entry *pMatch;
|
struct Address_Cache_Entry *pMatch;
|
||||||
int index = 0;
|
uint32_t index = 0;
|
||||||
|
|
||||||
pMatch = Address_Cache;
|
pMatch = Address_Cache;
|
||||||
while (pMatch <= &Address_Cache[MAX_ADDRESS_CACHE - 1]) {
|
while (pMatch <= &Address_Cache[MAX_ADDRESS_CACHE - 1]) {
|
||||||
|
|||||||
@@ -462,7 +462,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:
|
||||||
apdu_decode_confirmed_service_request(&apdu[0],
|
(void)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);
|
||||||
if (apdu_confirmed_dcc_disabled(service_choice)) {
|
if (apdu_confirmed_dcc_disabled(service_choice)) {
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ int awf_decode_service_request(
|
|||||||
decoded_len =
|
decoded_len =
|
||||||
decode_octet_string(&apdu[len], len_value_type,
|
decode_octet_string(&apdu[len], len_value_type,
|
||||||
&data->fileData[0]);
|
&data->fileData[0]);
|
||||||
if (decoded_len != len_value_type) {
|
if ((uint32_t)decoded_len != len_value_type) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
len += decoded_len;
|
len += decoded_len;
|
||||||
@@ -181,7 +181,7 @@ int awf_decode_service_request(
|
|||||||
decoded_len =
|
decoded_len =
|
||||||
decode_octet_string(&apdu[len], len_value_type,
|
decode_octet_string(&apdu[len], len_value_type,
|
||||||
&data->fileData[i]);
|
&data->fileData[i]);
|
||||||
if (decoded_len != len_value_type) {
|
if ((uint32_t)decoded_len != len_value_type) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
len += decoded_len;
|
len += decoded_len;
|
||||||
|
|||||||
Reference in New Issue
Block a user