| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Somewhat hard to read and the code base already has many overlong
lines.
Found with below spatch file and some manual editing in ax25/access.c
to restore a comment lost by spatch.
@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>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT rsdwnlnk.o -MD -MP -MF .deps/rsdwnlnk.Tpo -c -o rsdwnlnk.o rsdwnlnk.c
rsdwnlnk.c: In function ‘main’:
rsdwnlnk.c:81:12: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
if ((addr = ax25_config_get_addr(argv[1])) == NULL) {
^
rsdwnlnk.c:87:22: warning: pointer targets in passing argument 1 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
if (ax25_aton_entry(addr, axbind.fsa_digipeater[0].ax25_call) == -1) {
^
In file included from rsdwnlnk.c:17:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
rsdwnlnk.c:109:8: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
addr = rose_ntoa(&rosepeer.srose_addr);
^
rsdwnlnk.c:111:23: warning: pointer targets in passing argument 1 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
if (ax25_aton_entry(addr, axconnect.fsa_digipeater[n].ax25_call) == -1) {
^
In file included from rsdwnlnk.c:17:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
rsdwnlnk.c:123:7: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
addr = rose_ntoa(&rosepeer.srose_addr);
^
rsdwnlnk.c:124:22: warning: pointer targets in passing argument 1 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
if (ax25_aton_entry(addr + 4, axconnect.fsa_digipeater[n].ax25_call) == -1) {
^
In file included from rsdwnlnk.c:17:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
rsdwnlnk.c:202:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(buffer, "*** Connection refused\r");
^
In file included from rsdwnlnk.c:2:0:
/usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
rsdwnlnk.c:205:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(buffer, "*** No known route\r");
^
In file included from rsdwnlnk.c:2:0:
/usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
rsdwnlnk.c:208:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(buffer, "*** Connection timed out\r");
^
In file included from rsdwnlnk.c:2:0:
/usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
rsdwnlnk.c:211:12: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness [-Wpointer-sign]
sprintf(buffer, "ERROR: cannot connect to AX.25 callsign, %s\r", strerror(errno));
^
In file included from rsdwnlnk.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’
extern int sprintf (char *__restrict __s,
^
rsdwnlnk.c:217:38: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
write(STDOUT_FILENO, buffer, strlen(buffer));
^
In file included from rsdwnlnk.c:2:0:
/usr/include/string.h:398:15: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
extern size_t strlen (const char *__s)
^
rsdwnlnk.c:229:9: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(buffer, "*** Connected\r");
^
In file included from rsdwnlnk.c:2:0:
/usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
rsdwnlnk.c:230:37: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
write(STDOUT_FILENO, buffer, strlen(buffer));
^
In file included from rsdwnlnk.c:2:0:
/usr/include/string.h:398:15: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
extern size_t strlen (const char *__s)
^
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>
|
|
|
|
|
|
| |
Glibc as old as 2.2 provides working headers under the right name and
if not libax25 would install headers under the right name so this has
become redundant and ugly.
|
|
|
|
|
|
|
|
| |
Various socket syscalls receive a length argument that should be a
socklen_t rsp. a ptr to a socklen_t but instead int rsp. ptr to int were
being passed. While in theory this was a bug it's harmless as dangerously
large values would not be used but the issue manifested itself in a
significant number of compilation warnings.
|
|
|
|
|
|
| |
if ((n = read(s, buffer + 2, 512)) == -1) in rsdwnlnk.c
if ((n = read(STDIN_FILENO, buffer + 2, 512)) == -1) in rsuplnk.c
This smashes the buffer two bytes behind..
|
| |
|
|
|