Skip to content

Fix benign compiler warnings on macOS/FreeBSD clang#782

Merged
zakird merged 1 commit intozmap:mainfrom
droe:droe/fix-compiler-warnings
Feb 15, 2024
Merged

Fix benign compiler warnings on macOS/FreeBSD clang#782
zakird merged 1 commit intozmap:mainfrom
droe:droe/fix-compiler-warnings

Conversation

@droe
Copy link
Contributor

@droe droe commented Feb 14, 2024

Fix benign compiler warnings on macOS/FreeBSD clang:

lib/cachehash.c:152:27: warning: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        node_t *n = judy_get(ch, key, keylen);
                                 ^~~
lib/cachehash.c:166:27: warning: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        node_t *n = judy_get(ch, key, keylen);
                                 ^~~
lib/cachehash.c:217:21: warning: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        JHSI(v_, ch->judy, key, keylen);
                           ^~~
src/recv.c:104:17: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
                assert(buflen > zconf.data_link_size);
                       ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
src/send.c:420:37: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
                                memcpy(((void *)batch->packets) + (batch->len * MAX_PACKET_SIZE), contents, length);
                                       ~~~~~~~~~~~~~~~~~~~~~~~~ ^
src/parser.y:13:11: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
int yywrap()
          ^
           void

@zakird zakird merged commit ea95cfd into zmap:main Feb 15, 2024
@droe droe deleted the droe/fix-compiler-warnings branch March 11, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants