From c09b2a79f231516f6dee61f177760ce28366954a Mon Sep 17 00:00:00 2001 From: Pieter Pas Date: Sun, 24 Dec 2023 18:23:48 +0100 Subject: [PATCH] Improve warnings GCC 4 --- src/AH/Settings/Warnings.hpp | 12 ++++-------- src/MIDI_Interfaces/MIDI_Sender.hpp | 6 ++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/AH/Settings/Warnings.hpp b/src/AH/Settings/Warnings.hpp index a61c427e19..a2c3f10c47 100644 --- a/src/AH/Settings/Warnings.hpp +++ b/src/AH/Settings/Warnings.hpp @@ -35,16 +35,12 @@ #else // __GNUC__ < 5 #define AH_DIAGNOSTIC_WERROR() \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic error \"-Wall\"") \ - _Pragma("GCC diagnostic error \"-Wextra\"") \ - _Pragma("GCC diagnostic ignored \"-Wc++0x-compat\"") \ - _Pragma("GCC diagnostic ignored \"-Wattributes\"") + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wattributes\"") #define AH_DIAGNOSTIC_POP() _Pragma("GCC diagnostic pop") #define AH_DIAGNOSTIC_EXTERNAL_HEADER() \ - _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wall\"") \ - _Pragma("GCC diagnostic ignored \"-Wextra\"") \ - _Pragma("GCC diagnostic ignored \"-Wregister\"") \ - _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") #endif diff --git a/src/MIDI_Interfaces/MIDI_Sender.hpp b/src/MIDI_Interfaces/MIDI_Sender.hpp index 7b78460c1d..8e3d09bcb3 100644 --- a/src/MIDI_Interfaces/MIDI_Sender.hpp +++ b/src/MIDI_Interfaces/MIDI_Sender.hpp @@ -1,5 +1,9 @@ #pragma once +#include + +AH_DIAGNOSTIC_WERROR() + #include BEGIN_CS_NAMESPACE @@ -177,3 +181,5 @@ class MIDI_Sender { END_CS_NAMESPACE #include "MIDI_Sender.ipp" + +AH_DIAGNOSTIC_POP()