We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Clang-5.0.1 on OpenBSD complains when compiling dns.c:
cc -std=gnu99 -Wall -Wextra -O2 -g -fstack-protector -O2 -pipe -DDNS_DEBUG -DDNS_MAIN -o dns dns.c dns.c:383:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if HAVE___ATOMIC_FETCH_ADD && __GCC_ATOMIC_LONG_LOCK_FREE == 2 ^ dns.c:375:34: note: expanded from macro 'HAVE___ATOMIC_FETCH_ADD' #define HAVE___ATOMIC_FETCH_ADD (defined __ATOMIC_RELAXED) ^ dns.c:392:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if HAVE___ATOMIC_FETCH_SUB && __GCC_ATOMIC_LONG_LOCK_FREE == 2 ^ dns.c:379:33: note: expanded from macro 'HAVE___ATOMIC_FETCH_SUB' #define HAVE___ATOMIC_FETCH_SUB HAVE___ATOMIC_FETCH_ADD ^ dns.c:375:34: note: expanded from macro 'HAVE___ATOMIC_FETCH_ADD' #define HAVE___ATOMIC_FETCH_ADD (defined __ATOMIC_RELAXED) ^ dns.c:788:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if DNS_HAVE_SOCKADDR_UN ^ dns.c:782:31: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:788:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] dns.c:782:51: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:843:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if DNS_HAVE_SOCKADDR_UN ^ dns.c:782:31: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:843:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] dns.c:782:51: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:849:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if DNS_HAVE_SOCKADDR_UN ^ dns.c:782:31: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:849:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] dns.c:782:51: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:909:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if DNS_HAVE_SOCKADDR_UN ^ dns.c:782:31: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:909:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] dns.c:782:51: note: expanded from macro 'DNS_HAVE_SOCKADDR_UN' #define DNS_HAVE_SOCKADDR_UN (defined AF_UNIX && !defined _WIN32) ^ dns.c:6134:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if HAVE_SOCK_CLOEXEC ^ dns.c:6118:28: note: expanded from macro 'HAVE_SOCK_CLOEXEC' #define HAVE_SOCK_CLOEXEC (defined SOCK_CLOEXEC) ^ dns.c:6137:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if HAVE_SOCK_NONBLOCK ^ dns.c:6122:29: note: expanded from macro 'HAVE_SOCK_NONBLOCK' #define HAVE_SOCK_NONBLOCK (defined SOCK_NONBLOCK) ^ dns.c:6143:25: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if defined F_SETFD && !HAVE_SOCK_CLOEXEC ^ dns.c:6118:28: note: expanded from macro 'HAVE_SOCK_CLOEXEC' #define HAVE_SOCK_CLOEXEC (defined SOCK_CLOEXEC) ^ dns.c:6148:28: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if defined O_NONBLOCK && !HAVE_SOCK_NONBLOCK ^ dns.c:6122:29: note: expanded from macro 'HAVE_SOCK_NONBLOCK' #define HAVE_SOCK_NONBLOCK (defined SOCK_NONBLOCK) ^ dns.c:6206:26: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if (defined F_SETFD && !HAVE_SOCK_CLOEXEC) || (defined O_NONBLOCK && !H... ^ dns.c:6118:28: note: expanded from macro 'HAVE_SOCK_CLOEXEC' #define HAVE_SOCK_CLOEXEC (defined SOCK_CLOEXEC) ^ dns.c:6206:72: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] ...F_SETFD && !HAVE_SOCK_CLOEXEC) || (defined O_NONBLOCK && !HAVE_SOCK_NONB... ^ dns.c:6122:29: note: expanded from macro 'HAVE_SOCK_NONBLOCK' #define HAVE_SOCK_NONBLOCK (defined SOCK_NONBLOCK) ^ 16 warnings generated.
The text was updated successfully, but these errors were encountered:
Fix -Wexpansion-to-defined warnings
f3a3778
Closes wahern#25
Successfully merging a pull request may close this issue.
Clang-5.0.1 on OpenBSD complains when compiling dns.c:
The text was updated successfully, but these errors were encountered: