PDP-10 / supdup

Community maintained SUPDUP client for Unix
Other
16 stars 8 forks source link

PGCC/NVHPC compiler warning (integer conversion resulted in a change of sign) #39

Open johnsonjh opened 1 month ago

johnsonjh commented 1 month ago

A minor thing - I see NVHPC and Portland Group C is reporting a warning (on both Linux/POWER and Linux/x86_64; line numbers below are with PR #36 applied):

pgcc -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -c -o tcp.o tcp.c
"tcp.c", line 59: warning: integer conversion resulted in a change of sign [integer_sign_change]
        if (tsin->sin_addr.s_addr == -1)
                                     ^

This seems to be an accurate warning: addr was deprecated in favor of aton since passing signed INADDR_NONE (-1) via the return type of in_addr_t (unsigned integer) is system- and compiler-dependent.