From 0a04a6d1a14992e4528bacb78de8dc0be5bdd987 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Aug 2023 16:51:59 +1000 Subject: [PATCH] Cleanup: quiet GCC's -Wsuggest-attribute=format warning --- build_files/cmake/macros.cmake | 1 + intern/ghost/intern/GHOST_SystemWayland.cc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 3d2db6ae674..d065a0ff80c 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -786,6 +786,7 @@ macro(remove_strict_flags) if(CMAKE_COMPILER_IS_GNUCC) remove_cc_flag( "-Wstrict-prototypes" + "-Wsuggest-attribute=format" "-Wmissing-prototypes" "-Wmissing-declarations" "-Wmissing-format-attribute" diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index e08049cb0ba..c4cb40b5bb1 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -1392,6 +1392,11 @@ static void ghost_wl_display_report_error(wl_display *display) ::exit(-1); } +#ifdef __GNUC__ +static void ghost_wayland_log_handler(const char *msg, va_list arg) + __attribute__((format(printf, 1, 0))); +#endif + /** * Callback for WAYLAND to run when there is an error. *