From ce547e5980d5c8a82a4c5b82e4dc03b702f02654 Mon Sep 17 00:00:00 2001 From: Janusz Majnert Date: Thu, 29 Oct 2015 12:04:38 +0100 Subject: [PATCH] Adding -Werror compilation flag [Issue#] N/A [Problem] Compilation warnings being ignored by developers [Cause] Too much compiler output [Solution] Adding a -Werror compilation flag so that warnings are treated as errors [Verify] Check that the project builds without warnings Compilation warnings should not be ignored. They often warn about things that may cause trouble if unattended. Too much warnings also pollutes the compiler output making it illegible. Adding this compilation flag will allow us to maintain the quality of our code. Note: This commit also fixes one warning in WebKitEngineService.cpp (initialization list reordering). Change-Id: If30512b534268d5857ec08e47935bd5e19eef980 --- CMakeLists.txt | 2 +- services/WebKitEngineService/WebKitEngineService.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 218c05e..1dc53e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/services") #disable for merge - WebView is not ready for this -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long -Werror") if(COVERAGE_STATS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}") diff --git a/services/WebKitEngineService/WebKitEngineService.cpp b/services/WebKitEngineService/WebKitEngineService.cpp index 62e7fb4..a451fac 100644 --- a/services/WebKitEngineService/WebKitEngineService.cpp +++ b/services/WebKitEngineService/WebKitEngineService.cpp @@ -42,8 +42,8 @@ EXPORT_SERVICE(WebKitEngineService, "org.tizen.browser.webkitengineservice") WebKitEngineService::WebKitEngineService() : m_initialised(false) - , m_stopped(false) , m_guiParent(nullptr) + , m_stopped(false) , m_currentTabId(TabId::NONE) { m_mostRecentTab.clear(); -- 2.7.4