From 6952b95cefe39de054283638e4874cb4a3c9c0fb Mon Sep 17 00:00:00 2001 From: Seungyoun Ju Date: Tue, 12 Feb 2013 12:11:01 +0900 Subject: [PATCH] fvisibility=hidden is applied and API's return value is checked - Issues Unnecessary symbols should be hided. There is the API's return value which is not checked. - Fix description Build option is changed. API's return value is checked. Change-Id: I01be7c806ca7d7b4e161c3daad0790729a26b5b7 --- CMakeLists.txt | 2 +- test/tethering_test.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 187d1b3..75bd74e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DTIZEN_DEBUG") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=%{_libdir}") +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=%{_libdir} -fvisibility=hidden") FIND_PROGRAM(MARSHALTOOL NAMES glib-genmarshal) EXEC_PROGRAM("${MARSHALTOOL}" ARGS "--prefix=marshal ${INC_DIR}/marshal.list --header > ${INC_DIR}/marshal.h") diff --git a/test/tethering_test.c b/test/tethering_test.c index 59674f8..026400b 100644 --- a/test/tethering_test.c +++ b/test/tethering_test.c @@ -560,12 +560,17 @@ gboolean input(GIOChannel *channel, GIOCondition condition, gpointer data) } #else GError *err = NULL; + GIOStatus ios; - g_io_channel_read_chars(channel, buf, INPUT_BUF_LEN, &read, &err); + ios = g_io_channel_read_chars(channel, buf, INPUT_BUF_LEN, &read, &err); if (err != NULL) { - g_print("g_io_channel_read is failed : %s\n", err->message); + g_print("g_io_channel_read_chars is failed : %s\n", + err->message); g_error_free(err); return FALSE; + } else if (ios != G_IO_STATUS_NORMAL) { + g_print("g_io_channel_read_chars is failed : %d\n", ios); + return FALSE; } #endif -- 2.7.4