summaryrefslogtreecommitdiffstats
path: root/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-06-07 00:35:58 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-06-07 00:40:04 +0200
commit49009539791c7a888d93d062ee41e5ce7d65e8fe (patch)
treeb75a59ba0ff148b58729fd0f6558607fbee208c8 /ax25
parentfc7cee38b29d3d0345be983c933986e9f127ca6c (diff)
ax25/axspawn.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 axspawn.o -MD -MP -MF .deps/axspawn.Tpo -c -o axspawn.o axspawn.c axspawn.c: In function ‘decstathuf’: axspawn.c:595:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] srcptr = src; ^ axspawn.c:596:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] destptr = dest; ^ axspawn.c: In function ‘read_ax25’: axspawn.c:675:19: warning: pointer targets in passing argument 1 of ‘decstathuf’ differ in signedness [-Wpointer-sign] if (!decstathuf(s, decomp, len, &declen)) { ^ axspawn.c:584:5: note: expected ‘char *’ but argument is of type ‘unsigned char *’ int decstathuf(char *src, char *dest, int srclen, int *destlen) ^ axspawn.c:677:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(s, decomp); ^ In file included from axspawn.c:149: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) ^ axspawn.c:690:31: warning: pointer targets in passing argument 1 of ‘Strncasecmp’ differ in signedness [-Wpointer-sign] if (!huffman && !Strncasecmp(s, "//COMP ON\n", 10)) { ^ axspawn.c:498:5: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ int Strncasecmp(const char *s1, const char *s2, int n) ^ axspawn.c:704:10: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(s,"\n"); ^ In file included from axspawn.c:149: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) ^ axspawn.c:708:30: warning: pointer targets in passing argument 1 of ‘Strncasecmp’ differ in signedness [-Wpointer-sign] if (huffman && !Strncasecmp(s, "//COMP OFF\n", 11)) { ^ axspawn.c:498:5: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ int Strncasecmp(const char *s1, const char *s2, int n) ^ axspawn.c:727:10: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(s,"\n"); ^ In file included from axspawn.c:149: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) ^ axspawn.c: In function ‘new_user’: axspawn.c:1101:5: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] q = strchr(p, '/'); ^ axspawn.c:1145:5: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] p = q; ^ axspawn.c: In function ‘main’: axspawn.c:1557:17: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] if (read_ax25(buf, sizeof(buf)) < 0) ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ axspawn.c:1571:24: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] if ((cnt = read_ax25(buf, sizeof(buf)-1)) < 0) ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ axspawn.c:1655:19: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] cnt = read_ax25(buf, sizeof(buf)-1); ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ axspawn.c:1930:22: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] cnt = read_ax25(buf, sizeof(buf)); ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25')
-rw-r--r--ax25/axspawn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ax25/axspawn.c b/ax25/axspawn.c
index 23d7d34..253e5c3 100644
--- a/ax25/axspawn.c
+++ b/ax25/axspawn.c
@@ -583,8 +583,8 @@ int encstathuf(char *src, int srclen, char *dest, int *destlen)
int decstathuf(char *src, char *dest, int srclen, int *destlen)
{
- unsigned char *srcptr;
- unsigned char *destptr;
+ char *srcptr;
+ char *destptr;
int wrklen;
unsigned char bitmask;
unsigned short decod;
@@ -659,7 +659,7 @@ int _write_ax25(const char *s, int len)
return i > 0 ? i : 0; /* on error, -1 is returned */
}
-int read_ax25(unsigned char *s, int size)
+int read_ax25(char *s, int size)
{
int len;
int k;
@@ -1052,7 +1052,7 @@ void new_user(char *newuser)
char buf[4096];
char subdir[4];
int cnt;
- unsigned char *q;
+ char *q;
char *p;
struct stat fst;
int fd_a, fd_b, fd_l;