Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johnsonjh opened this issue Aug 9, 2024 · 0 comments

Comments

@johnsonjh
Copy link
Contributor

johnsonjh commented Aug 9, 2024

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.

@johnsonjh johnsonjh changed the title PGCC/NVHPC compiler warning (integer conversion resulted in a change of sign [integer_sign_change]) PGCC/NVHPC compiler warning (integer conversion resulted in a change of sign) Aug 9, 2024
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

No branches or pull requests

1 participant