BIND 10 trac1954, updated. 190b91b0701773f162424423789ee1d12fbc3260 [1954] Do not suppress errors, suppress warnings for perfdhcp.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue May 22 09:37:17 UTC 2012
The branch, trac1954 has been updated
via 190b91b0701773f162424423789ee1d12fbc3260 (commit)
from d6f64f5a6b1c524e6b6fd91151df7dee98add719 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 190b91b0701773f162424423789ee1d12fbc3260
Author: Marcin Siodelski <marcin at isc.org>
Date: Tue May 22 11:27:43 2012 +0200
[1954] Do not suppress errors, suppress warnings for perfdhcp.cc
-----------------------------------------------------------------------
Summary of changes:
tests/tools/perfdhcp/Makefile.am | 10 ++++++++--
tests/tools/perfdhcp/perfdhcp.cc | 14 +++++++++-----
2 files changed, 17 insertions(+), 7 deletions(-)
-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/Makefile.am b/tests/tools/perfdhcp/Makefile.am
index e1150cc..d9ebb97 100644
--- a/tests/tools/perfdhcp/Makefile.am
+++ b/tests/tools/perfdhcp/Makefile.am
@@ -12,10 +12,16 @@ if USE_STATIC_LINK
AM_LDFLAGS += -static
endif
-# We have to suppress errors because we are compiling C code with CXX
+# We have to suppress warnings because we are compiling C code with CXX
# We have to do this to link with new C++ pieces of code
perfdhcp_CXXFLAGS = $(AM_CXXFLAGS)
-perfdhcp_CXXFLAGS += -Wno-error -Wno-writestrings
+if USE_CLANGPP
+perfdhcp_CXXFLAGS += -Wno-deprecated-writable-strings
+else
+if USE_GXX
+perfdhcp_CXXFLAGS += -Wno-write-strings
+endif
+endif
pkglibexec_PROGRAMS = perfdhcp
perfdhcp_SOURCES = perfdhcp.cc
diff --git a/tests/tools/perfdhcp/perfdhcp.cc b/tests/tools/perfdhcp/perfdhcp.cc
index 0e093cc..05b8015 100644
--- a/tests/tools/perfdhcp/perfdhcp.cc
+++ b/tests/tools/perfdhcp/perfdhcp.cc
@@ -42,8 +42,10 @@ main(const int argc, char* const argv[])
#define __STDC_LIMIT_MACROS
#ifdef __linux__
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#endif
#include <sys/types.h>
#include <sys/select.h>
@@ -1959,7 +1961,7 @@ decodebase(void)
fprintf(stderr, "not yet supported base '%s'\n", b0);
exit(2);
}
-
+
/*
* get the server socket address from the command line:
* - flags: inherited from main, 0 or AI_NUMERICHOST (for literals)
@@ -2219,8 +2221,8 @@ void
reapchild(int sig)
{
int status;
-
- sig = sig;
+ int s = sig;
+ s = 1;
while (wait3(&status, WNOHANG, NULL) > 0)
/* continue */;
}
@@ -2232,8 +2234,10 @@ reapchild(int sig)
void
interrupt(int sig)
{
- sig = sig;
- interrupted = 1;
+ // Do something to avoid unused-variable warning
+ int s = sig;
+ s = 1;
+ interrupted = s;
}
/*
More information about the bind10-changes
mailing list