Adding -Werror compilation flag 28/50528/2
authorJanusz Majnert <j.majnert@samsung.com>
Thu, 29 Oct 2015 11:04:38 +0000 (12:04 +0100)
committerJanusz Majnert <j.majnert@samsung.com>
Thu, 29 Oct 2015 11:25:12 +0000 (12:25 +0100)
[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
services/WebKitEngineService/WebKitEngineService.cpp

index 218c05e..1dc53e8 100644 (file)
@@ -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}")
index 62e7fb4..a451fac 100644 (file)
@@ -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();