compiler warning: fix
Fix compiler warning: variable was set but never used Fix compiler warning: clobber ignored
This commit is contained in:
parent
e1c9539962
commit
5ef8f5ead2
|
@ -59,6 +59,7 @@
|
|||
#include "ares_getopt.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "inet_ntop.h"
|
||||
#include "ares_nowarn.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
|
|
1
adig.c
1
adig.c
|
@ -57,6 +57,7 @@
|
|||
#include "inet_ntop.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_getopt.h"
|
||||
#include "ares_nowarn.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
|
|
1
ahost.c
1
ahost.c
|
@ -42,6 +42,7 @@
|
|||
#include "inet_net_pton.h"
|
||||
#include "ares_getopt.h"
|
||||
#include "ares_ipv6.h"
|
||||
#include "ares_nowarn.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#define BUILDING_ARES_NOWARN_C 1
|
||||
|
||||
#include "ares_nowarn.h"
|
||||
|
||||
#if (SIZEOF_INT == 2)
|
||||
|
@ -111,3 +113,31 @@ unsigned int aresx_sztoui(ssize_t sznum)
|
|||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(__unix__)
|
||||
|
||||
int aresx_FD_ISSET(int fd, fd_set *fdset)
|
||||
{
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:1469) /* clobber ignored */
|
||||
return FD_ISSET(fd, fdset);
|
||||
#pragma warning(pop)
|
||||
}
|
||||
|
||||
void aresx_FD_SET(int fd, fd_set *fdset)
|
||||
{
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:1469) /* clobber ignored */
|
||||
FD_SET(fd, fdset);
|
||||
#pragma warning(pop)
|
||||
}
|
||||
|
||||
void aresx_FD_ZERO(fd_set *fdset)
|
||||
{
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:593) /* variable was set but never used */
|
||||
FD_ZERO(fdset);
|
||||
#pragma warning(pop)
|
||||
}
|
||||
|
||||
#endif /* __INTEL_COMPILER && __unix__ */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define HEADER_CARES_NOWARN_H
|
||||
|
||||
|
||||
/* Copyright (C) 2010 by Daniel Stenberg
|
||||
/* Copyright (C) 2010-2011 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
|
@ -25,4 +25,23 @@ int aresx_sztosi(ssize_t sznum);
|
|||
|
||||
unsigned int aresx_sztoui(ssize_t sznum);
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(__unix__)
|
||||
|
||||
int aresx_FD_ISSET(int fd, fd_set *fdset);
|
||||
|
||||
void aresx_FD_SET(int fd, fd_set *fdset);
|
||||
|
||||
void aresx_FD_ZERO(fd_set *fdset);
|
||||
|
||||
#ifndef BUILDING_ARES_NOWARN_C
|
||||
# undef FD_ISSET
|
||||
# define FD_ISSET(a,b) aresx_FD_ISSET((a),(b))
|
||||
# undef FD_SET
|
||||
# define FD_SET(a,b) aresx_FD_SET((a),(b))
|
||||
# undef FD_ZERO
|
||||
# define FD_ZERO(a) aresx_FD_ZERO((a))
|
||||
#endif
|
||||
|
||||
#endif /* __INTEL_COMPILER && __unix__ */
|
||||
|
||||
#endif /* HEADER_CARES_NOWARN_H */
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue