diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2024-08-04 17:02:00 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2024-08-13 19:35:49 +0100 |
commit | 80e7ed9383953c1bcd6f57c8b23257c04f597d3d (patch) | |
tree | bf719b661122cb2c3f0b30a0bae2aa7990881ef2 /winsup/cygwin | |
parent | 50cf10dfa485682f08d2975d69cee0a3b63c81b9 (diff) | |
download | newlib-80e7ed9383953c1bcd6f57c8b23257c04f597d3d.zip newlib-80e7ed9383953c1bcd6f57c8b23257c04f597d3d.tar.gz newlib-80e7ed9383953c1bcd6f57c8b23257c04f597d3d.tar.bz2 |
Cygwin: Fix warnings about narrowing conversions of socket ioctls
Fix gcc 12 warnings about narrowing conversions of socket ioctl constants
when used as case labels, e.g:
> ../../../../src/winsup/cygwin/net.cc: In function ‘int get_ifconf(ifconf*, int)’:
> ../../../../src/winsup/cygwin/net.cc:1940:18: error: narrowing conversion of ‘2152756069’ from ‘long int’ to ‘int’ [-Wnarrowing]
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/fhandler/socket.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/net.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler/socket.cc b/winsup/cygwin/fhandler/socket.cc index f7c5ff6..c0cef7d 100644 --- a/winsup/cygwin/fhandler/socket.cc +++ b/winsup/cygwin/fhandler/socket.cc @@ -86,7 +86,7 @@ struct __old_ifreq { int fhandler_socket::ioctl (unsigned int cmd, void *p) { - extern int get_ifconf (struct ifconf *ifc, int what); /* net.cc */ + extern int get_ifconf (struct ifconf *ifc, unsigned int what); /* net.cc */ int res; struct ifconf ifc, *ifcp; struct ifreq *ifrp; diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 08c584f..737e494 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1912,7 +1912,7 @@ freeifaddrs (struct ifaddrs *ifp) } int -get_ifconf (struct ifconf *ifc, int what) +get_ifconf (struct ifconf *ifc, unsigned int what) { __try { |