Permalink
Browse files

compiler warning: fix

Fix compiler warning: variable was set but never used

Fix compiler warning: clobber ignored
  • Loading branch information...
1 parent e1c9539 commit 5ef8f5ead2478defca69e303a47d00d21b16d838 @yangtse yangtse committed May 25, 2011
Showing with 55 additions and 1 deletion.
  1. +1 −0 acountry.c
  2. +1 −0 adig.c
  3. +1 −0 ahost.c
  4. +1 −0 ares_fds.c
  5. +30 −0 ares_nowarn.c
  6. +20 −1 ares_nowarn.h
  7. +1 −0 ares_process.c
View
@@ -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"
View
@@ -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"
View
@@ -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"
View
@@ -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)
View
@@ -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__ */
View
@@ -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 */
View
@@ -66,6 +66,7 @@
#include "ares.h"
#include "ares_dns.h"
+#include "ares_nowarn.h"
#include "ares_private.h"

0 comments on commit 5ef8f5e

Please sign in to comment.