| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arguably useful in documenting the return value is intentionally ignored
I think it's just cluttering the screen.
This is using the following semantic patch:
@castvoid@
expression F;
@@
- (void) F
+ F
(...)
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/va
r/ax25/"\" -O2 -Wall -pedantic -MT netromt.o -MD -MP -MF .deps/netromt.Tpo -c -o netromt.o netromt.c
In file included from netromt.c:24:0:
netromt.c: In function ‘build_header’:
netromd.h:10:19: warning: overflow in implicit constant conversion [-Woverflow]
#define NODES_SIG 0xFF
^
netromt.c:28:15: note: in expansion of macro ‘NODES_SIG’
message[0] = NODES_SIG;
^~~~~~~~~
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 netromt.o -MD -MP -MF .deps/netromt.Tpo -c -o netromt.o netromt.c
netromt.c: In function ‘build_others’:
netromt.c:102:13: warning: variable ‘number’ set but not used [-Wunused-but-set-variable]
int which, number, quality, neigh_no, obs_count;
^
netromt.c:102:6: warning: variable ‘which’ set but not used [-Wunused-but-set-variable]
int which, number, quality, neigh_no, obs_count;
^
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 netromt.o -MD -MP -MF .deps/netromt.Tpo -c -o netromt.o netromt.c
netromt.c: In function ‘build_header’:
netromt.c:30:9: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(message + 1, nr_config_get_alias(NULL));
^
In file included from netromt.c:4: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)
^
netromt.c:31:12: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
strncat(message + 1, " ", MNEMONIC_LEN - strlen(message + 1));
^
In file included from netromt.c:4: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)
^
netromt.c:31:1: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign]
strncat(message + 1, " ", MNEMONIC_LEN - strlen(message + 1));
^
netromt.c:31:1: note: expected ‘char *’ but argument is of type ‘unsigned char *’
netromt.c: In function ‘build_mine’:
netromt.c:66:49: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
if (ax25_aton_entry(nr_config_get_addr(port), message + len) == -1) {
^
In file included from netromt.c:19:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
netromt.c:74:10: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(message + len, nr_config_get_alias(port));
^
In file included from netromt.c:4: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)
^
netromt.c:75:13: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len));
^
In file included from netromt.c:4: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)
^
netromt.c:75:2: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign]
strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len));
^
netromt.c:75:2: note: expected ‘char *’ but argument is of type ‘unsigned char *’
netromt.c:78:44: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
ax25_aton_entry(nr_config_get_addr(NULL), message + len);
^
In file included from netromt.c:19:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
netromt.c: In function ‘build_others’:
netromt.c:156:34: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
if (ax25_aton_entry(callsign, message + len) == -1) {
^
In file included from netromt.c:19:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
netromt.c:163:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
strcpy(message + len, mnemonic);
^
In file included from netromt.c:4: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)
^
netromt.c:164:14: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len));
^
In file included from netromt.c:4: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)
^
netromt.c:164:3: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign]
strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len));
^
netromt.c:164:3: note: expected ‘char *’ but argument is of type ‘unsigned char *’
netromt.c:167:35: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign]
if (ax25_aton_entry(neighbour, message + len) == -1) {
^
In file included from netromt.c:19:0:
/usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’
extern int ax25_aton_entry(const char *, char *);
^
[...]
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.
|
| |
|
|
|