tests: fix enum/int confusion (Intel C), fix autotools CFLAGS for servers

By dropping the unused enum wrappers for `AF_*` macros.

Also fix `./configure` to apply `--enable-werror` options to
`tests/servers`, to catch this next time.

Seen with Intel C compiler:
```
socksd.c(184): warning #188: enumerated type mixed with another type
socksd.c(881): warning #188: enumerated type mixed with another type
[...]
sws.c(76): warning #188: enumerated type mixed with another type
sws.c(229): warning #188: enumerated type mixed with another type
[...]
```
Ref: https://github.com/curl/curl/actions/runs/13296520425/job/37129676921#step:40:338

Closes #16314
This commit is contained in:
Viktor Szakats 2025-02-13 02:38:51 +01:00
parent d550966bf8
commit 4aec6cdfd3
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
3 changed files with 4 additions and 18 deletions

View File

@ -40,6 +40,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
# Prevent LIBS from being used for all link targets
LIBS = $(BLANK_AT_MAKETIME)
CFLAGS += @CURL_CFLAG_EXTRAS@
if DOING_NATIVE_WINDOWS
AM_CPPFLAGS += -DCURL_STATICLIB
endif

View File

@ -173,15 +173,7 @@ static unsigned short shortval(char *value)
return num & 0xffff;
}
static enum {
socket_domain_inet = AF_INET
#ifdef USE_IPV6
, socket_domain_inet6 = AF_INET6
#endif
#ifdef USE_UNIX_SOCKETS
, socket_domain_unix = AF_UNIX
#endif
} socket_domain = AF_INET;
static int socket_domain = AF_INET;
static void getconfig(void)
{

View File

@ -65,15 +65,7 @@
#define ERANGE 34 /* errno.h value */
#endif
static enum {
socket_domain_inet = AF_INET
#ifdef USE_IPV6
, socket_domain_inet6 = AF_INET6
#endif
#ifdef USE_UNIX_SOCKETS
, socket_domain_unix = AF_UNIX
#endif
} socket_domain = AF_INET;
static int socket_domain = AF_INET;
static bool use_gopher = FALSE;
static int serverlogslocked = 0;
static bool is_proxy = FALSE;