| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
They only enforce what's already the default.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
| |
Documentation and some comments were refering to /var/ax25/ax25rtd/-
ax25_routes rsp. /var/ax25/ax25rtd/ip_routes while the actual code was
using ax25_route rsp. ip_route, that is without plural 's'.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
| |
This is already standard with distributions since several years so change
the rpm spec file to follow.
For the time being the default names when using the configure script will
however stay unchanged.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
This is required by the Fedora versioning guidelines.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
As required by Fedora versioning guidelines.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ autoreconf --install --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:10: installing './compile'
configure.ac:14: installing './config.guess'
configure.ac:14: installing './config.sub'
configure.ac:4: installing './install-sh'
configure.ac:4: installing './missing'
Makefile.am: installing './INSTALL'
ax25ipd/Makefile.am: installing './depcomp'
$
Silenced down to the normal noise level by adding AC_CONFIG_MACRO_DIRS and
ACLOCAL_AMFLAGS as suggested.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Broken out from a patch by Wietse Ruyg <pe1oez@dds.nl>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
GCC would have done that itself but now the code is slightly less eyesore.
Broken out from a patch by Wietse Ruyg <pe1oez@dds.nl>.
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>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found by below coccinelle script.
@parens@
expression E;
@@
return
- (
E
- )
;
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
Compilers are ignoring it for over a quarter century. Time to catch up!
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ‘ts_format’:
listen.c:53:58: warning: ‘%06u’ directive output may be truncated writing between 6 and 10 bytes into a region of size between 0 and 7 [-Wformat-truncation=]
(void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%06u",
^~~~
listen.c:53:42: note: using the range [0, 4294967295] for directive argument
(void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%06u",
^~~~~~~~~~~~~~~~~~~~~
listen.c:53:9: note: ‘snprintf’ output between 16 and 27 bytes into a destination of size 16
(void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%06u",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sec / 3600, (sec % 3600) / 60, sec % 60, usec);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The value of the variables is such that there is no overflow possible
but GCC is not able to figure this out. Change the code such that GCC
can figure out the value range thus getting us rid of the variables.
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>
|
|
|
|
|
|
|
|
|
|
| |
fb9187cbfcbe ("ax25ipd: Switch version number printed to ax25-apps
version.") removed the VERS2 argument from printf but forgot to remove the
%s format string as well potencially crashing or printing garbage when
printing the version number.
Fixes: fb9187cbfcbe ("ax25ipd: Switch version number printed to ax25-apps version.")
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings:
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -g -O2 -Wall -MT io.o -MD -MP -MF .deps/io.Tpo -c -o io.o io.c
io.c: In function ‘io_open’:
io.c:324:18: warning: implicit declaration of function ‘ptsname’; did you mean ‘ttyname’? [-Wimplicit-function-declaration]
if ((namepts = ptsname(ttyfd)) == NULL) {
^~~~~~~
ttyname
io.c:324:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if ((namepts = ptsname(ttyfd)) == NULL) {
^
io.c:329:7: warning: implicit declaration of function ‘unlockpt’; did you mean ‘unlinkat’? [-Wimplicit-function-declaration]
if (unlockpt(ttyfd) == -1) {
^~~~~~~~
unlinkat
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
| |
We were including way too many system header files, some even multiple
times and it wasn't immediately visible. Clean this.
This also drops the definitions of __USE_XOPEN which never had the desired
effect with glibc.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
bzero is a mega-ancient use of bsdism.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
Supposedly it didn't work and it was never being built anyway.
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>
|
|
|
|
|
|
| |
I don't think this was ever meant to run on a BSD/i386 or BSD/OS system.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
io_error() has no callers outside its defining file.
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>
|
|
|
|
|
|
|
| |
make usr1_handler() static, remove its prototype from the header and reorder
code to avoid prototypes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
There were two - and they can be avoided entirely.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
It's only being used from within ax25ipd.c. To avoid the need for a
prototype within ax25ipd.c move the function above its first caller.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
It's only being used from within ax25ipd.c.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stats structure was defined in the ax25ipd.h header as a static variable
resulting in each compilation unit having its own stats variable. The
sole reader, the do_stats() function would thus only see and print all-zero
stats.
This also fixes the following warnings:
make[2]: Entering directory '/home/ralf/src/ax25/ax25-apps/ax25ipd'
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT crc.o -MD -MP -MF .deps/crc.Tpo -c -o crc.o crc.c
In file included from crc.c:3:0:
ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable]
} stats;
^~~~~
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT routing.o -MD -MP -MF .deps/routing.Tpo -c -o routing.o routing.c
In file included from routing.c:10:0:
ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable]
} stats;
^~~~~
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT syslog.o -MD -MP -MF .deps/syslog.Tpo -c -o syslog.o syslog.c
In file included from syslog.c:4:0:
ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable]
} stats;
^~~~~
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT bpqether.o -MD -MP -MF .deps/bpqether.Tpo -c -o bpqether.o bpqether.c
In file included from bpqether.c:39:0:
ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable]
} stats;
^~~~~
[...]
make[2]: Leaving directory '/home/ralf/src/ax25/ax25-apps/ax25ipd'
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
| |
Broken out from a larger patch submitted by Wietse Ruyg <pe1oez@dds.nl>.
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>
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wextra -pedantic -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
utils.c: In function ‘lprintf’:
utils.c:73:27: warning: comparison is always true due to limited range of data type [-Wtype-limits]
|| (*p > 126 && *p < 160 && sevenbit))
^
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>
|