mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-13 04:29:09 +08:00
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>
This commit is contained in:
parent
c75f3939d8
commit
510cbdf32a
@ -86,7 +86,7 @@ struct __old_ifreq {
|
|||||||
int
|
int
|
||||||
fhandler_socket::ioctl (unsigned int cmd, void *p)
|
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;
|
int res;
|
||||||
struct ifconf ifc, *ifcp;
|
struct ifconf ifc, *ifcp;
|
||||||
struct ifreq *ifrp;
|
struct ifreq *ifrp;
|
||||||
|
@ -1912,7 +1912,7 @@ freeifaddrs (struct ifaddrs *ifp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
get_ifconf (struct ifconf *ifc, int what)
|
get_ifconf (struct ifconf *ifc, unsigned int what)
|
||||||
{
|
{
|
||||||
__try
|
__try
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user