Skip to content

new compiler warnings

Compiling sbbsecho.c
sbbsecho.c: In function ‘export_echomail’:
sbbsecho.c:4829:49: warning: pointer targets in passing argument 1 of ‘ascii_str’ differ in signedness [-Wpointer-sign]
 4829 |     utf8_to_cp437_inplace(hdr.to), ascii_str(hdr.to);
      |                                              ~~~^~~
      |                                                 |
      |                                                 char *
In file included from sbbsecho.c:48:
str_util.h:42:18: note: expected ‘unsigned char *’ but argument is of type ‘char *’
   42 | DLLEXPORT char * ascii_str(uchar* str);
      |                  ^~~~~~~~~
sbbsecho.c:4830:51: warning: pointer targets in passing argument 1 of ‘ascii_str’ differ in signedness [-Wpointer-sign]
 4830 |     utf8_to_cp437_inplace(hdr.from), ascii_str(hdr.from);
      |                                                ~~~^~~~~
      |                                                   |
      |                                                   char *
In file included from sbbsecho.c:48:
str_util.h:42:18: note: expected ‘unsigned char *’ but argument is of type ‘char *’
   42 | DLLEXPORT char * ascii_str(uchar* str);
      |                  ^~~~~~~~~
sbbsecho.c:4831:51: warning: pointer targets in passing argument 1 of ‘ascii_str’ differ in signedness [-Wpointer-sign]
 4831 |     utf8_to_cp437_inplace(hdr.subj), ascii_str(hdr.subj);
      |                                                ~~~^~~~~
      |                                                   |
      |                                                   char *
In file included from sbbsecho.c:48:
str_util.h:42:18: note: expected ‘unsigned char *’ but argument is of type ‘char *’
   42 | DLLEXPORT char * ascii_str(uchar* str);
      |                  ^~~~~~~~~

gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

Edited by Nigel Reed