diff --git a/src/86box.c b/src/86box.c index 720e33279..5a91458ec 100644 --- a/src/86box.c +++ b/src/86box.c @@ -97,6 +97,13 @@ #include <86box/version.h> #include <86box/gdbstub.h> +// Disable c99-designator to avoid the warnings about int ng +#ifdef __clang__ +#if __has_warning("-Wunused-but-set-variable") +#pragma clang diagnostic ignored "-Wunused-but-set-variable" +#endif +#endif + /* Stuff that used to be globally declared in plat.h but is now extern there and declared here instead. */ diff --git a/src/discord.c b/src/discord.c index 12a5a0396..27b8c6fdf 100644 --- a/src/discord.c +++ b/src/discord.c @@ -89,7 +89,9 @@ discord_update_activity(int paused) *(paren - 1) = '\0'; #pragma GCC diagnostic push +#if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wformat-truncation" +#endif if (strlen(vm_name) < 100) { snprintf(activity.details, sizeof(activity.details), "Running \"%s\"", vm_name); diff --git a/src/sound/midi_rtmidi.cpp b/src/sound/midi_rtmidi.cpp index 43f0695ee..c65a42b87 100644 --- a/src/sound/midi_rtmidi.cpp +++ b/src/sound/midi_rtmidi.cpp @@ -36,6 +36,13 @@ extern "C" #include <86box/midi_rtmidi.h> #include <86box/config.h> +// Disable c99-designator to avoid the warnings in rtmidi_*_device +#ifdef __clang__ +#if __has_warning("-Wc99-designator") +#pragma clang diagnostic ignored "-Wc99-designator" +#endif +#endif + static RtMidiOut * midiout = nullptr; static RtMidiIn * midiin = nullptr; static int midi_out_id = 0, midi_in_id = 0;