From d8fc50ebb9458685d9ee3a3aa02db435c024a9a7 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:22:13 +0100 Subject: [PATCH] Supress the gnu-zero-variadic-macro-arguments warning on Apple in displayinfo main --- Source/displayinfo/display_info/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/displayinfo/display_info/main.c b/Source/displayinfo/display_info/main.c index e8c60fbb..c0e8fb8b 100644 --- a/Source/displayinfo/display_info/main.c +++ b/Source/displayinfo/display_info/main.c @@ -130,6 +130,11 @@ static void toHexString( } } +#if defined(__APPLE__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" +#endif + #define Trace(fmt, ...) \ do { \ fprintf(stdout, "<< " fmt "\n", ##__VA_ARGS__); \ @@ -146,7 +151,7 @@ void on_operational_state_change(bool is_operational, VARIABLE_IS_NOT_USED void* Trace("Operational state of the instance %s operational", is_operational ? "is" : "not"); } -void ShowMenu() +void ShowMenu(void) { printf("Version %s\n" "Enter\n"