[evolution-mapi] Correct how extra compiler warnings are used in the maintainer mode
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Correct how extra compiler warnings are used in the maintainer mode
- Date: Wed, 14 Nov 2018 11:59:06 +0000 (UTC)
commit 3eb50919c22f51240f95d81b52219fe8703fec39
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 14 13:00:16 2018 +0100
Correct how extra compiler warnings are used in the maintainer mode
...and address the newly shown warning as well.
cmake/modules/SetupBuildFlags.cmake | 11 ++++++-----
src/libexchangemapi/e-mapi-fast-transfer.c | 1 +
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/cmake/modules/SetupBuildFlags.cmake b/cmake/modules/SetupBuildFlags.cmake
index 10b12bd..4c61541 100644
--- a/cmake/modules/SetupBuildFlags.cmake
+++ b/cmake/modules/SetupBuildFlags.cmake
@@ -20,22 +20,23 @@ macro(setup_build_flags _maintainer_mode)
-Wredundant-decls
-Wundef
-Wwrite-strings
+ -Wno-cast-function-type
-no-undefined
-fno-strict-aliasing
)
- if(_maintainer_mode)
+ if(${_maintainer_mode})
list(APPEND proposed_flags
-Wall
-Wextra
-Wdeprecated-declarations
-Wmissing-include-dirs
)
- else(_maintainer_mode)
+ else(${_maintainer_mode})
list(APPEND proposed_flags
-Wno-deprecated-declarations
-Wno-missing-include-dir)
- endif(_maintainer_mode)
+ endif(${_maintainer_mode})
list(APPEND proposed_c_flags
${proposed_flags}
@@ -62,7 +63,7 @@ macro(setup_build_flags _maintainer_mode)
foreach(flag IN LISTS proposed_c_flags)
check_c_compiler_flag(${flag} c_flag_${flag}_supported)
if(c_flag_${flag}_supported)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+ set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
endif(c_flag_${flag}_supported)
unset(c_flag_${flag}_supported)
endforeach()
@@ -71,7 +72,7 @@ macro(setup_build_flags _maintainer_mode)
foreach(flag IN LISTS proposed_cxx_flags)
check_cxx_compiler_flag(${flag} cxx_flag_${flag}_supported)
if(cxx_flag_${flag}_supported)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+ set(CMAKE_CXX_FLAGS "${flag} ${CMAKE_CXX_FLAGS}")
endif(cxx_flag_${flag}_supported)
unset(cxx_flag_${flag}_supported)
endforeach()
diff --git a/src/libexchangemapi/e-mapi-fast-transfer.c b/src/libexchangemapi/e-mapi-fast-transfer.c
index 9a6cbfb..747924a 100644
--- a/src/libexchangemapi/e-mapi-fast-transfer.c
+++ b/src/libexchangemapi/e-mapi-fast-transfer.c
@@ -331,6 +331,7 @@ parse_property_cb (struct SPropValue prop, void *closure)
} else if (prop.value.bin.cb > 65535) {
g_debug ("%s: PT_BINARY property 0x%X larger than 64KB (%d), will be
truncated", G_STRFUNC, prop.ulPropTag, prop.value.bin.cb);
}
+ /* falls through */
case PT_BOOLEAN:
case PT_I2:
case PT_LONG:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]