From: mk5004.lee Date: Wed, 20 Nov 2019 11:20:14 +0000 (+0900) Subject: Fix build break X-Git-Tag: accepted/tizen/unified/20191212.123705~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6879bcfbe3ebe0c0831bef3f9b5c01be37239645;p=platform%2Fcore%2Fapi%2Fnotification.git Fix build break - one definition rule violation inlining failed issue Change-Id: Id9e73333133d6a83391b71d21aab53cd02f13037 Signed-off-by: mk5004.lee --- diff --git a/notification-ex/CMakeLists.txt b/notification-ex/CMakeLists.txt index bf61938..6464cf4 100644 --- a/notification-ex/CMakeLists.txt +++ b/notification-ex/CMakeLists.txt @@ -28,9 +28,9 @@ pkg_check_modules(notification-ex REQUIRED FOREACH(flag ${notification-ex_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline -std=c++11") +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++11") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") SET(CMAKE_CXX_FLAGS_RELEASE "-O2") diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt index ea7eba3..6413974 100644 --- a/unittest/CMakeLists.txt +++ b/unittest/CMakeLists.txt @@ -15,7 +15,7 @@ pkg_check_modules(notification-ex_unittests REQUIRED FOREACH(flag ${notification-ex_unittests_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline") +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++11") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") diff --git a/unittest/mock/gio_mock.h b/unittest/mock/gio_mock.h index 936ec9e..ea0a33d 100644 --- a/unittest/mock/gio_mock.h +++ b/unittest/mock/gio_mock.h @@ -47,8 +47,6 @@ typedef void (*GFileProgressCallback) (goffset current_num_bytes, DECLARE_FAKE_VALUE_FUNC(GFile*, g_file_new_for_path, const char*); DECLARE_FAKE_VALUE_FUNC(gboolean, g_file_query_exists, GFile*, GCancellable*); -DECLARE_FAKE_VALUE_FUNC(gboolean, g_file_copy, GFile*, GFile*, GFileCopyFlags, - GCancellable*, GFileProgressCallback, gpointer, GError**); DECLARE_FAKE_VALUE_FUNC(gboolean, g_file_make_directory, GFile*, GCancellable*, GError**); DECLARE_FAKE_VALUE_FUNC(int, access, const char*, int); diff --git a/unittest/mock/mock.cc b/unittest/mock/mock.cc index 4ccd8ae..4aefb58 100644 --- a/unittest/mock/mock.cc +++ b/unittest/mock/mock.cc @@ -30,8 +30,6 @@ DEFINE_FAKE_VALUE_FUNC(int, app_get_name, char**); /* gio */ DEFINE_FAKE_VALUE_FUNC(GFile*, g_file_new_for_path, const char*); DEFINE_FAKE_VALUE_FUNC(gboolean, g_file_query_exists, GFile*, GCancellable*); -DEFINE_FAKE_VALUE_FUNC(gboolean, g_file_copy, GFile*, GFile*, GFileCopyFlags, - GCancellable*, GFileProgressCallback, gpointer, GError**); DEFINE_FAKE_VALUE_FUNC(gboolean, g_file_make_directory, GFile*, GCancellable*, GError**); DEFINE_FAKE_VALUE_FUNC(int, access, const char*, int); @@ -41,7 +39,7 @@ DEFINE_FAKE_VALUE_FUNC(ssize_t, smack_new_label_from_path, const char*, const char*, int, char**); /* tzplatform */ -DEFINE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, enum tzplatform_variable); +DEFINE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, tzplatform_variable_e); /* security-manager */ DEFINE_FAKE_VALUE_FUNC(int, security_manager_private_sharing_req_new, diff --git a/unittest/mock/tzplatform_config_mock.h b/unittest/mock/tzplatform_config_mock.h index a24c49a..f21894e 100644 --- a/unittest/mock/tzplatform_config_mock.h +++ b/unittest/mock/tzplatform_config_mock.h @@ -23,12 +23,12 @@ extern "C" { #endif -enum tzplatform_variable { +typedef enum { USER = 0, SYSTEM = 1, -}; +}tzplatform_variable_e; -DECLARE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, enum tzplatform_variable); +DECLARE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, tzplatform_variable_e); #ifdef __cplusplus } diff --git a/unittest/src/test_shared_file.cc b/unittest/src/test_shared_file.cc index 582d322..761fb03 100644 --- a/unittest/src/test_shared_file.cc +++ b/unittest/src/test_shared_file.cc @@ -48,12 +48,6 @@ gboolean __fake_g_file_make_directory(GFile* file, GCancellable* cancellable, return true; } -gboolean __fake_g_file_copy(GFile* source, GFile* dest, GFileCopyFlags flags, - GCancellable* cancellable, GFileProgressCallback callback, - gpointer data, GError** error) { - return false; -} - int __fake_access(const char* path, int mode) { return 0; } @@ -66,7 +60,7 @@ ssize_t __fake_smack_new_label_from_path(const char* path, const char* xattr, } // tzplatform -const char* __fake_tzplatform_getenv(enum tzplatform_variable id) { +const char* __fake_tzplatform_getenv(tzplatform_variable_e id) { return "/opt/usr/home/owner/apps_rw"; } @@ -107,7 +101,6 @@ class SharedFileTest : public ::testing::Test { g_file_new_for_path_fake.custom_fake = __fake_g_file_new_for_path; g_file_query_exists_fake.custom_fake = __fake_g_file_query_exists; g_file_make_directory_fake.custom_fake = __fake_g_file_make_directory; - g_file_copy_fake.custom_fake = __fake_g_file_copy; access_fake.custom_fake = __fake_access; security_manager_private_sharing_req_new_fake.custom_fake = __fake_security_manager_private_sharing_req_new;