summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunjin Lee <yunjin-.lee@samsung.com>2016-04-19 09:08:24 +0900
committerYunjin Lee <yunjin-.lee@samsung.com>2016-04-19 17:35:26 +0900
commitf59d808b0c4d8897be12542ec152deb12a272961 (patch)
tree197205c908c1c17b305351cf60a349e8f3cfbb6f
parentfe83a9bfa5b925556577564566854c434f78a036 (diff)
downloadprivacy-setting-f59d808b0c4d8897be12542ec152deb12a272961.tar.gz
privacy-setting-f59d808b0c4d8897be12542ec152deb12a272961.tar.bz2
privacy-setting-f59d808b0c4d8897be12542ec152deb12a272961.zip
Change-Id: Ia6b6fd54cca3a8cad92df5812edd486f518f44a2 Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
-rw-r--r--CMakeLists.txt10
-rw-r--r--ug/src/privacy_list_view.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92b3245..134739c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,11 +5,19 @@ INCLUDE(FindPkgConfig)
STRING(REGEX MATCH "([^.]*)" SO_VERSION "${VERSION}")
+# Set compiler flags
SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -Wall -g -ggdb")
SET(CMAKE_C_FLAGS_CCOV "-O2 -Wall --coverage")
-ADD_DEFINITIONS("-Werror")
+ADD_DEFINITIONS("-Werror") # Make all warnings into errors.
+ADD_DEFINITIONS("-Wall") # Generate all warnings
+ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings
+ADD_DEFINITIONS("-Wno-unused-parameter") # Ignore unused parameter
+
+# Set linker flags
+SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
diff --git a/ug/src/privacy_list_view.c b/ug/src/privacy_list_view.c
index 14efde5..bf637c2 100644
--- a/ug/src/privacy_list_view.c
+++ b/ug/src/privacy_list_view.c
@@ -80,7 +80,7 @@ void create_privacy_list_view(struct ug_data_s *ugd)
itc->func.del = gl_del_cb;
Elm_Object_Item *it = NULL;
int i = 0;
- for (i = 0; i < g_list_length(ugd->privacy_list); ++i) {
+ for (i = 0; i < (int)g_list_length(ugd->privacy_list); ++i) {
item_data_s *id = calloc(sizeof(item_data_s), 1);
id->index = i;
id->title = (char*)g_list_nth_data(ugd->privacy_list, i);