Commit 190b91b0 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[1954] Do not suppress errors, suppress warnings for perfdhcp.cc

parent d6f64f5a
......@@ -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
......
......@@ -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;
}
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment