From: Janusz Majnert Date: Thu, 29 Oct 2015 11:04:38 +0000 (+0100) Subject: Adding -Werror compilation flag X-Git-Tag: accepted/tizen/tv/20151030.063422~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F50528%2F2;p=profile%2Ftv%2Fapps%2Fweb%2Fbrowser.git 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 --- 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();