From aa4df026d44bd205f8bfce8a3b8d6a1144332f32 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 30 Jun 2014 19:30:49 -0700 Subject: Finally get around to decoupling the warning system --- src/monitor/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/monitor') diff --git a/src/monitor/main.cpp b/src/monitor/main.cpp index 5d7478d..ec1139a 100644 --- a/src/monitor/main.cpp +++ b/src/monitor/main.cpp @@ -140,10 +140,10 @@ pid_t start_process(ZString exec) } if (pid == 0) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" + DIAG_PUSH(); + DIAG_I(cast_qual); execv(exec.c_str(), const_cast(args)); -#pragma GCC diagnostic pop + DIAG_POP(); perror("Failed to exec"); kill(getppid(), SIGABRT); exit(1); @@ -161,11 +161,11 @@ void stop_process(int sig) kill(pid_login, sig); if (pid_char) kill(pid_char, sig); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wold-style-cast" -#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" + DIAG_PUSH(); + DIAG_I(old_style_cast); + DIAG_I(zero_as_null_pointer_constant); signal(sig, SIG_DFL); -#pragma GCC diagnostic pop + DIAG_POP(); raise(sig); } } // namespace tmwa -- cgit v1.2.3-60-g2f50