From f467331934fb195aca5f80c3e2740905b2f9c613 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 15 Jun 2023 20:10:25 +0200 Subject: [PATCH] Add ifdefs around #pragma GCC diagnostic --- ext/gstmoodbar/gstfastspectrum.cpp | 4 ++++ src/core/SBSystemPreferences.h | 4 ++++ src/core/mac_startup.mm | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/ext/gstmoodbar/gstfastspectrum.cpp b/ext/gstmoodbar/gstfastspectrum.cpp index edb8d2c4d..91a47ac34 100644 --- a/ext/gstmoodbar/gstfastspectrum.cpp +++ b/ext/gstmoodbar/gstfastspectrum.cpp @@ -50,10 +50,14 @@ enum { } // namespace #define gst_fastspectrum_parent_class parent_class +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" +#endif G_DEFINE_TYPE(GstFastSpectrum, gst_fastspectrum, GST_TYPE_AUDIO_FILTER) +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif static void gst_fastspectrum_finalize(GObject *object); static void gst_fastspectrum_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); diff --git a/src/core/SBSystemPreferences.h b/src/core/SBSystemPreferences.h index e66865087..cfbfa2127 100644 --- a/src/core/SBSystemPreferences.h +++ b/src/core/SBSystemPreferences.h @@ -13,9 +13,11 @@ SBSystemPreferencesWindow, SBSystemPreferencesPane, SBSystemPreferencesAnchor; +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmultichar" #pragma GCC diagnostic ignored "-Wfour-char-constants" +#endif enum SBSystemPreferencesSaveOptions { SBSystemPreferencesSaveOptionsYes = 'yes ' /* Save the file. */, @@ -32,7 +34,9 @@ enum SBSystemPreferencesPrintingErrorHandling { 'lwdt' /* print a detailed report of PostScript errors */ }; +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif typedef enum SBSystemPreferencesPrintingErrorHandling SBSystemPreferencesPrintingErrorHandling; diff --git a/src/core/mac_startup.mm b/src/core/mac_startup.mm index 837ac1bd0..11091bc85 100644 --- a/src/core/mac_startup.mm +++ b/src/core/mac_startup.mm @@ -261,10 +261,14 @@ QDebug operator<<(QDebug dbg, NSObject *object) { [self setDelegate:delegate_]; // FIXME +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif [[NSUserNotificationCenter defaultUserNotificationCenter]setDelegate:delegate_]; +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif }