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/io/cxxstdio.hpp | 8 +++++--- src/io/fd.hpp | 18 +++++++++--------- src/io/line_test.cpp | 2 -- src/io/read_test.cpp | 2 -- src/io/write_test.cpp | 2 -- 5 files changed, 14 insertions(+), 18 deletions(-) (limited to 'src/io') diff --git a/src/io/cxxstdio.hpp b/src/io/cxxstdio.hpp index 66c2aa8..a8343c0 100644 --- a/src/io/cxxstdio.hpp +++ b/src/io/cxxstdio.hpp @@ -131,11 +131,13 @@ namespace cxxstdio {} ~EnumConverter() { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtype-limits" + DIAG_PUSH(); + DIAG_I(type_limits); if (min_value <= mid && mid <= max_value) -#pragma GCC diagnostic pop + { + DIAG_POP(); out = E(mid); + } } U *operator &() { diff --git a/src/io/fd.hpp b/src/io/fd.hpp index d725c8a..f1d1751 100644 --- a/src/io/fd.hpp +++ b/src/io/fd.hpp @@ -137,24 +137,24 @@ namespace io } void clr(FD fd) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wold-style-cast" + DIAG_PUSH(); + DIAG_I(old_style_cast); FD_CLR(fd.uncast_dammit(), &fds); -#pragma GCC diagnostic pop + DIAG_POP(); } bool isset(FD fd) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wold-style-cast" + DIAG_PUSH(); + DIAG_I(old_style_cast); return FD_ISSET(fd.uncast_dammit(), &fds); -#pragma GCC diagnostic pop + DIAG_POP(); } void set(FD fd) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wold-style-cast" + DIAG_PUSH(); + DIAG_I(old_style_cast); FD_SET(fd.uncast_dammit(), &fds); -#pragma GCC diagnostic pop + DIAG_POP(); } static diff --git a/src/io/line_test.cpp b/src/io/line_test.cpp index 9f04bf8..edf60bd 100644 --- a/src/io/line_test.cpp +++ b/src/io/line_test.cpp @@ -28,8 +28,6 @@ namespace tmwa { -#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" - static io::FD string_pipe(ZString sz) { diff --git a/src/io/read_test.cpp b/src/io/read_test.cpp index 6fc1563..8fe84b7 100644 --- a/src/io/read_test.cpp +++ b/src/io/read_test.cpp @@ -29,8 +29,6 @@ namespace tmwa { -#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" - static io::FD string_pipe(ZString sz) { diff --git a/src/io/write_test.cpp b/src/io/write_test.cpp index 7219c4b..2347e7e 100644 --- a/src/io/write_test.cpp +++ b/src/io/write_test.cpp @@ -33,8 +33,6 @@ namespace tmwa { -#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" - static io::FD pipew(io::FD& rfd) { -- cgit v1.2.3-70-g09d2