make parseable for splint
- replace non standard u_char with unsigned char (ANSI) - advice splint to ignore variadic macros - move declarations from the middle to top of functions (C90) - replace local library includes <> to ""
This commit is contained in:
@ -19,7 +19,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
FILE *fp = NULL;
|
||||
size_t buff_len, len;
|
||||
u_char buf[1024];
|
||||
unsigned char buf[1024];
|
||||
mbus_frame reply;
|
||||
mbus_frame_data frame_data;
|
||||
char *xml_result = NULL;
|
||||
|
@ -20,7 +20,7 @@ main(int argc, char *argv[])
|
||||
FILE *fp = NULL;
|
||||
size_t buff_len, len;
|
||||
int result;
|
||||
u_char raw_buff[4096], buff[4096];
|
||||
unsigned char raw_buff[4096], buff[4096];
|
||||
mbus_frame reply;
|
||||
mbus_frame_data frame_data;
|
||||
char *xml_result = NULL;
|
||||
|
@ -82,7 +82,7 @@ hex_to_bin(char *buff, size_t buff_size, char *hex_buff)
|
||||
while ((ptr != endptr) && i < buff_size-1)
|
||||
{
|
||||
ptr = endptr;
|
||||
buff[i++] = (u_char)strtol(ptr, (char **)&endptr, 16);
|
||||
buff[i++] = (unsigned char)strtol(ptr, (char **)&endptr, 16);
|
||||
}
|
||||
|
||||
return i;
|
||||
|
Reference in New Issue
Block a user