From 26e2a97b1cbb099fae5a7b613ea1edbb342a4061 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Mon, 6 Apr 2020 16:27:42 +0200 Subject: [Minor] enable Wmissing-format-attribute --- cmake/CompilerWarnings.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake') diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index 2dcad92ef..fe6735c35 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -11,6 +11,7 @@ CHECK_C_COMPILER_FLAG(-Wstrict-prototypes SUPPORT_WSTRICT_PROTOTYPES) CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG) CHECK_C_COMPILER_FLAG(-Wno-unused-const-variable SUPPORT_WNO_UNUSED_CONST) CHECK_C_COMPILER_FLAG(-Wmissing-noreturn SUPPORT_WMISSING_NORETURN) +CHECK_C_COMPILER_FLAG(-Wmissing-format-attribute SUPPORT_WMISSING_FORMAT_ATTRIBUTE) # GCC 6 specific CHECK_C_COMPILER_FLAG(-Wnull-dereference SUPPORT_WNULL_DEREFERENCE) CHECK_C_COMPILER_FLAG(-Wduplicated-cond SUPPORT_WDUPLICATED_COND) @@ -71,6 +72,9 @@ ENDIF(SUPPORT_WIMPLICIT_FALLTHROUGH) IF(SUPPORT_WMISSING_NORETURN) ADD_COMPILE_OPTIONS("-Wmissing-noreturn") ENDIF(SUPPORT_WMISSING_NORETURN) +IF(SUPPORT_WMISSING_FORMAT_ATTRIBUTE) + ADD_COMPILE_OPTIONS("-Wmissing-format-attribute") +ENDIF(SUPPORT_WMISSING_FORMAT_ATTRIBUTE) CHECK_C_COMPILER_FLAG(-fPIC SUPPORT_FPIC) IF(SUPPORT_FPIC) -- cgit v1.2.3