diff --git a/src/sound/midi_rtmidi.cpp b/src/sound/midi_rtmidi.cpp index 743b828ad..354c7f61b 100644 --- a/src/sound/midi_rtmidi.cpp +++ b/src/sound/midi_rtmidi.cpp @@ -39,6 +39,7 @@ extern "C" { // Disable c99-designator to avoid the warnings in rtmidi_*_device #ifdef __clang__ # if __has_warning("-Wc99-designator") +# pragma clang diagnostic push # pragma clang diagnostic ignored "-Wc99-designator" # endif #endif @@ -302,4 +303,11 @@ const device_t rtmidi_input_device = { .force_redraw = NULL, .config = midi_input_config }; + +#ifdef __clang__ +# if __has_warning("-Wc99-designator") +# pragma clang diagnostic pop +# endif +#endif + } diff --git a/src/sound/snd_opl_ymfm.cpp b/src/sound/snd_opl_ymfm.cpp index bb52f3c55..012e77bdb 100644 --- a/src/sound/snd_opl_ymfm.cpp +++ b/src/sound/snd_opl_ymfm.cpp @@ -29,6 +29,15 @@ extern "C" { #include <86box/snd_opl.h> #include <86box/mem.h> #include <86box/rom.h> + +// Disable c99-designator to avoid the warnings in *_ymfm_device +#ifdef __clang__ +# if __has_warning("-Wc99-designator") +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wc99-designator" +# endif +#endif + } #define RSM_FRAC 10 @@ -432,4 +441,11 @@ const fm_drv_t ymfm_drv { &ymfm_drv_set_do_cycles, NULL, }; + +#ifdef __clang__ +# if __has_warning("-Wc99-designator") +# pragma clang diagnostic pop +# endif +#endif + }