| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings:
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wunused-parameter -flto -MT call.o -MD -MP -MF .deps/call.Tpo -c -o call.o call.c
[...]
call.c: In function ‘sevenplname’:
call.c:1910:52: warning: unused parameter ‘buf’ [-Wunused-parameter]
int *logfile, char parms[], int parmsbytes, char buf[],
^~~
call.c:1911:7: warning: unused parameter ‘bytes’ [-Wunused-parameter]
int bytes)
^~~~~
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Somewhat hard to read and the code base already has many overlong
lines
Found with below spatch files:
@parens@
expression E, F, G;
binary operator X;
statement S;
@@
- if ((E = F) X G)
+ E = F;
+ if (E X G)
S
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC with LTO enabled warn:
/bin/sh ../libtool --tag=CC --mode=link gcc -O2 -Wall -flto -o call call.o menu.o crc.o yapp.o dostime.o -lncursesw -lax25
libtool: link: gcc -O2 -Wall -flto -o call call.o menu.o crc.o yapp.o dostime.o -lncursesw -lax25
menu.h:22:9: warning: type of 'winopen' does not match original declaration [-Wlto-type-mismatch]
WINDOW* winopen(wint*, int, int, int, int, int);
^
menu.c:20:9: note: 'winopen' was previously declared here
WINDOW *winopen(wint * wtab, int nlines, int ncols, int begin_y,
^
menu.c:20:9: note: code may be misoptimized unless -fno-strict-aliasing is used
This was caused by different .c files being built with different libc
feature selection macros. Adding
#define _DEFAULT_SOURCE
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE_EXTENDED
to menu.c would have been sufficient but it seems good practice to add
the same definition to all .c files.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When downloading a file with a very long filename the 80 byte buffer used
by start_ab_download() might overflow. Increase the buffer to a sufficient
size and switch to using snprintf for double safety.
This also fixes the following warnings:
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT call.o -MD -MP -MF .deps/call.Tpo -c -o call.o call.c
call.c: In function ‘cmd_call’:
call.c:1008:33: warning: ‘%s’ directive writing up to 254 bytes into a region of size 62 [-Wformat-overflow=]
sprintf(s, "filename : %s", gp->file_name);
^~
call.c:1008:3: note: ‘sprintf’ output between 19 and 273 bytes into a destination of size 80
sprintf(s, "filename : %s", gp->file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
call.c:1022:30: warning: ‘%s’ directive writing up to 254 bytes into a region of size 65 [-Wformat-overflow=]
sprintf(s, "Unable to open %s", gp->file_name);
^~
call.c:1022:3: note: ‘sprintf’ output between 16 and 270 bytes into a destination of size 80
sprintf(s, "Unable to open %s", gp->file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
__USE_XOPEN should not be used directly by application code. Other
feature selection macros must be defined before inclusion of any system
header files.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
| |
the upper left. call comes from commandline arg. Ensure to write
it in upper case.
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
| |
- Make static what can be made static.
- Add declaration where they were missing.
- Don't define variables in headers.
- Move declaations to the proper locations.
- Pick up declarations from the proper headers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
It didn't match the actual function definition.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
Replace sequences of multiple empty lines to just one.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
Put while of do {} while loop on the line of the closing brace.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
| |
But leave remotecommand() to avoid a warning about the function being
unused. It currently is unused because its sole caller is commented
out.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
| |
C guarantees initialization to zero for global variables but putting those
variables into the .bss section. An explicit initialization however will
put the variable into the .data section where it will inflate the executable.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Cathryn Mataga.
1. Now supports UTF8 or IBM850 as the encoding style over AX25.
1a. Attention was paid to make sure that wide characters worked
with East Asian fonts.
2. Now the screen can be resized.
correctly. The program no longer crashes when it is resized.
3. Added a scrollback buffer. Use the up and down arrow keys
or the page up/page down keys to scroll through history.
After the screen begins scrolling, press 'up arrow' to view
history.
4. Many visual quirks have been fixed.
This version is now dependent on iconv and wide character
versions of ncurses, which I think should be everywhere these
days.
Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a signal is delivered between the start of the main select loop and select
might wait for a long time. Fixing this with select is not possible so
switch to pselect.
Unlike select pselect akes a struct timespec pointer as its argument so
rewrite the related infrastructure to work with struct timespec instead of
struct timeval.
For now the race did only affect the SIGQUIT delivery.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
So document the fact.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
automaticaly -> automatically
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
This is Linux software so we don't have to deal with this kind of
UNIX V7 or SVR3 braindamage of resetting the signal handlers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
A compiler won't know that the interrupted variable can be changed behind
its back in a signal handler so it might do clever overoptimizations.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This may happen when call is running in curses mode, and the terminal
window is resized which results in a SIGWINCH sent. Ncurses as normally
configured on Linux distributions will have installed a handler. If
as it is the most likely case, the select call will be interrupted by
the signal, select will return EINTR and call will exit.
Note that this doesn't mean it's now a good idea to resize the window.
Call will still not handle the screen size change properly and the output
will look ugly and missformatted.
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>
|
|
|
|
|
|
|
| |
Indentation by tabs only. Move case labels in switches are on the same
level as the switch keyword.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
They only inflate the .data section of the binary. Initializations to
FALSE are still left to do.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wno-pointer-sign -MT call.o -MD -MP
-MF .deps/call.Tpo -c -o call.o call.c
call.c: In function ‘wrdstatw’:
call.c:482:9: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
mv -f .deps/call.Tpo .deps/call.Po
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wno-pointer-sign -MT menu.o -MD -MP -MF .deps/menu.Tpo -c -o menu.o menu.c
menu.c: In function ‘p_dwn_menu’:
menu.c:132:15: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
menu.c: In function ‘top_menu’:
menu.c:244:11: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
call.c:1590:6: warning: variable ‘extrach’ set but not used [-Wunused-but-set-va
riable]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|