summaryrefslogtreecommitdiffstats
path: root/netrom/netromt.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-06-07 00:45:49 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-06-07 00:45:49 +0200
commiteabf95c2c7476f4f75238bb8cd93bb01dde8b298 (patch)
tree2f821bb6b9ca5168b3abadb080fd6ad4cf6673a7 /netrom/netromt.c
parent90c54bbf3d46d723e6898d2ac26244146d0e1d42 (diff)
netrom/netromt.c: Fix signedness compiler warnings.
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>
Diffstat (limited to 'netrom/netromt.c')
-rw-r--r--netrom/netromt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/netrom/netromt.c b/netrom/netromt.c
index 2a5bc3c..17c17c3 100644
--- a/netrom/netromt.c
+++ b/netrom/netromt.c
@@ -23,7 +23,7 @@
#include "../pathnames.h"
#include "netromd.h"
-static int build_header(unsigned char *message)
+static int build_header(char *message)
{
message[0] = NODES_SIG;
@@ -35,7 +35,7 @@ static int build_header(unsigned char *message)
static void build_mine(int s, struct full_sockaddr_ax25 *dest, int dlen, int localval, int pause)
{
- unsigned char message[100];
+ char message[100];
char buffer[255], *port, *p;
FILE *fp;
int len;
@@ -94,7 +94,7 @@ static void build_mine(int s, struct full_sockaddr_ax25 *dest, int dlen, int loc
static void build_others(int s, int min_obs, struct full_sockaddr_ax25 *dest, int dlen, int port, int pause)
{
- unsigned char message[300];
+ char message[300];
FILE *fpnodes, *fpneigh;
char nodes_buffer[90];
char neigh_buffer[90];