7800-devtools / 7800basic

a BASIC-like language for creating games that run on the Atari 7800 console.
Other
23 stars 3 forks source link

minor clang warnings #13

Closed polluks2 closed 1 year ago

polluks2 commented 2 years ago

cc -g -O0 -o snip snip.c
snip.c:67:24: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                strncpy(snipfilename,binbuffer+t,1023);
                                     ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:128:34: note: expanded from macro 'strncpy'
                __builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                               ^~~~~~~~~~~
snip.c:72:14: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                t=t+strlen(binbuffer+t)+1;
                           ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:82:28: note: passing argument to parameter '__s' here
size_t   strlen(const char *__s);
                            ^
2 warnings generated.
msaarna commented 1 year ago

This is resolved now, in master. Thanks for the report!