|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When sending files of 1GB or larger, size_buffer was not large enough to
hold the number including a trailing \0.
This also fixes the following warning:
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT yapp.o -MD -MP -MF .deps/yapp.Tpo -c -o yapp.o yapp.c
yapp.c: In function ‘yapp_upload_data’:
yapp.c:200:24: warning: ‘%ld’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=]
sprintf(size_buffer, "%ld", length);
^~~
yapp.c:200:23: note: directive argument in the range [-2147483648, 2147483647]
sprintf(size_buffer, "%ld", length);
^~~~~
yapp.c:200:2: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 10
sprintf(size_buffer, "%ld", length);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
make[2]: Entering directory '/home/ralf/src/ax25/ax25-apps/listen'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT listen.o -MD -MP -MF .deps/listen.Tpo -c -o listen.o listen.c
listen.c: In function ‘ascii_dump’:
listen.c:231:4: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign]
strncat(buf, &c, 1);
^
listen.c:231:4: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
listen.c: In function ‘hex_dump’:
listen.c:282:8: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
data2 = data;
^
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT rosedump.o -MD -MP -MF .deps/rosedump.Tpo -c -o rosedump.o rosedump.c
rosedump.c: In function ‘facility’:
rosedump.c:331:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
factot = data;
^
rosedump.c:398:11: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
for (d = data, l = 0; l < lgaddcall;
^
rosedump.c:406:28: warning: pointer targets in passing argument 1 of ‘dump_ax25_call’ differ in signedness [-Wpointer-sign]
dump_ax25_call(d, 7));
^
rosedump.c:296:14: note: expected ‘unsigned char *’ but argument is of type ‘char *’
static char *dump_ax25_call(unsigned char *data, int l_data)
^
rosedump.c:410:28: warning: pointer targets in passing argument 1 of ‘dump_ax25_call’ differ in signedness [-Wpointer-sign]
dump_ax25_call(d, 7));
^
rosedump.c:296:14: note: expected ‘unsigned char *’ but argument is of type ‘char *’
static char *dump_ax25_call(unsigned char *data, int l_data)
^
rosedump.c:438:4: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign]
strncpy(indorig, data, lgadind);
^
rosedump.c:438:4: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
rosedump.c:441:4: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign]
strncpy(inddest, data, lgadind);
^
rosedump.c:441:4: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
rosedump.c:451:14: warning: pointer targets in passing argument 1 of ‘data_dump’ differ in signedness [-Wpointer-sign]
data_dump(factot, lgtot, 1);
^
In file included from rosedump.c:11:0:
listen.h:31:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’
void data_dump(unsigned char *, int, int);
^
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
utils.c: In function ‘lprintf’:
utils.c:49:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
for (p = str; *p != '\0'; p++) {
^
utils.c:71:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
for (p = str; *p != '\0'; p++)
^
[...]
make[2]: Leaving directory '/home/ralf/src/ax25/ax25-apps/listen'
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|