Splinted files and corrected splint errors.
This commit is contained in:
@@ -1 +1 @@
|
|||||||
-Iinclude -Iports/linux -castfcnptr -fullinitblock -initallelements -weak +posixlib
|
-Iinclude -Idemo/object -Iports/linux -castfcnptr -fullinitblock -initallelements -weak +posixlib
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ SPLINT=/usr/bin/splint
|
|||||||
|
|
||||||
[ -x ${SPLINT} ] || exit 0
|
[ -x ${SPLINT} ] || exit 0
|
||||||
|
|
||||||
INCLUDES="-Iinclude -Iports/linux"
|
INCLUDES="-Iinclude -Idemo/object -Iports/linux"
|
||||||
SETTINGS="-castfcnptr -fullinitblock -initallelements -weak +posixlib"
|
SETTINGS="-castfcnptr -fullinitblock -initallelements -weak +posixlib"
|
||||||
|
|
||||||
if [ ! -x .splintrc ]
|
if [ ! -x .splintrc ]
|
||||||
|
|||||||
@@ -519,11 +519,11 @@ static const char trailingBytesForUTF8[256] = {
|
|||||||
it's hard to know how many characters there are! */
|
it's hard to know how many characters there are! */
|
||||||
static int utf8_isvalid(
|
static int utf8_isvalid(
|
||||||
const char *str,
|
const char *str,
|
||||||
int length)
|
size_t length)
|
||||||
{
|
{
|
||||||
const unsigned char *p, *pend = (unsigned char *) str + length;
|
const unsigned char *p, *pend = (unsigned char *) str + length;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
int ab;
|
size_t ab;
|
||||||
|
|
||||||
for (p = (unsigned char *) str; p < pend; p++) {
|
for (p = (unsigned char *) str; p < pend; p++) {
|
||||||
c = *p;
|
c = *p;
|
||||||
@@ -538,7 +538,7 @@ static int utf8_isvalid(
|
|||||||
if ((c & 0xc0) != 0xc0) {
|
if ((c & 0xc0) != 0xc0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ab = trailingBytesForUTF8[c];
|
ab = (size_t)trailingBytesForUTF8[c];
|
||||||
if (length < ab) {
|
if (length < ab) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ int wpm_decode_object_id(
|
|||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return len;
|
return (int)len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ int wpm_decode_object_property(
|
|||||||
if ((tag_number == 2) && (decode_is_opening_tag(&apdu[len - 1]))) {
|
if ((tag_number == 2) && (decode_is_opening_tag(&apdu[len - 1]))) {
|
||||||
len--;
|
len--;
|
||||||
wp_data->application_data_len =
|
wp_data->application_data_len =
|
||||||
bacapp_data_len(&apdu[len], apdu_len - len,
|
bacapp_data_len(&apdu[len], (unsigned)(apdu_len - len),
|
||||||
wp_data->object_property);
|
wp_data->object_property);
|
||||||
len++;
|
len++;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user