diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2020-09-09 18:16:22 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2020-09-09 18:16:22 +0900 |
commit | e118c49b63e9eac585ba91ac663180f8575b741f (patch) | |
tree | a8cf1086d0ccf78544342898878736c4f30c0176 | |
parent | 92dceb07cec46f8d41f75e85c2771d01c579ac32 (diff) | |
download | librua-e118c49b63e9eac585ba91ac663180f8575b741f.tar.gz librua-e118c49b63e9eac585ba91ac663180f8575b741f.tar.bz2 librua-e118c49b63e9eac585ba91ac663180f8575b741f.zip |
Remove build warning messages
Change-Id: I7c7907e0a1651031ba8ee18ed8c8f296f454bc2b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/rua_dbus.c | 1 | ||||
-rw-r--r-- | tests/unittest/rua_stat_unit_test.cc | 13 | ||||
-rw-r--r-- | tests/unittest/rua_unit_test.cc | 9 |
3 files changed, 14 insertions, 9 deletions
diff --git a/src/rua_dbus.c b/src/rua_dbus.c index 8963229..aae2c28 100644 --- a/src/rua_dbus.c +++ b/src/rua_dbus.c @@ -20,6 +20,7 @@ #include <glib.h> #include <gio/gio.h> #include <dlog.h> +#include <sqlite3.h> #include "rua.h" #include "rua_dbus.h" diff --git a/tests/unittest/rua_stat_unit_test.cc b/tests/unittest/rua_stat_unit_test.cc index 1257cb2..c2cc092 100644 --- a/tests/unittest/rua_stat_unit_test.cc +++ b/tests/unittest/rua_stat_unit_test.cc @@ -32,7 +32,7 @@ using ::testing::SetArgPointee; using ::testing::Return; static int __rua_stat_tag_iter(const char* stat_tag, void* user_data) { - + return 0; } class StatMocks : public ::testing::NiceMock<SqlMock> {}; @@ -51,7 +51,8 @@ class RuaStatTest : public TestFixture { }; TEST_F(RuaStatTest, rua_stat_update_for_uid_N) { - int ret = rua_stat_update_for_uid("caller", "tag", 5001); + int ret = rua_stat_update_for_uid(const_cast<char*>("caller"), + const_cast<char*>("tag"), 5001); EXPECT_NE(ret, 0); } @@ -74,7 +75,8 @@ TEST_F(RuaStatTest, rua_stat_get_stat_tags) { EXPECT_CALL(GetMock<SqlMock>(), sqlite3_finalize(_)).WillOnce(Return(0)); - int ret = rua_stat_get_stat_tags("caller", __rua_stat_tag_iter, nullptr); + int ret = rua_stat_get_stat_tags(const_cast<char*>("caller"), + __rua_stat_tag_iter, nullptr); EXPECT_EQ(ret, 0); free(table); @@ -105,8 +107,9 @@ TEST_F(RuaStatTest, rua_stat_db_update) { EXPECT_CALL(GetMock<SqlMock>(), sqlite3_finalize(_)).WillRepeatedly(Return(0)); - int ret = rua_stat_db_update("caller", "rua_stat_tag"); + int ret = rua_stat_db_update(const_cast<char*>("caller"), + const_cast<char*>("rua_stat_tag")); EXPECT_EQ(ret, SQLITE_DONE); free(table); -}
\ No newline at end of file +} diff --git a/tests/unittest/rua_unit_test.cc b/tests/unittest/rua_unit_test.cc index be8ed1e..3021478 100644 --- a/tests/unittest/rua_unit_test.cc +++ b/tests/unittest/rua_unit_test.cc @@ -57,7 +57,8 @@ TEST_F(RuaTest, rua_add_history_for_uid) { aul_add_rua_history_for_uid(_, _)). WillOnce(Return(0)); - int ret = rua_add_history_for_uid("test", "/app_path", "arg", 5001); + int ret = rua_add_history_for_uid(const_cast<char*>("test"), + const_cast<char*>("/app_path"), const_cast<char*>("arg"), 5001); EXPECT_EQ(ret, 0); } @@ -66,7 +67,7 @@ TEST_F(RuaTest, rua_delete_history_with_pkgname) { aul_delete_rua_history_for_uid(_, _)). WillOnce(Return(0)); - int ret = rua_delete_history_with_pkgname("test"); + int ret = rua_delete_history_with_pkgname(const_cast<char*>("test")); EXPECT_EQ(ret, 0); } @@ -75,7 +76,7 @@ TEST_F(RuaTest, rua_delete_history_with_apppath) { aul_delete_rua_history_for_uid(_, _)). WillOnce(Return(0)); - int ret = rua_delete_history_with_apppath("/app_path"); + int ret = rua_delete_history_with_apppath(const_cast<char*>("/app_path")); EXPECT_EQ(ret, 0); } @@ -213,4 +214,4 @@ TEST_F(RuaTest, rua_delete_history_with_instance_id) { int ret; ret = rua_delete_history_with_instance_id("appid", "instanceid"); EXPECT_EQ(ret, 0); -}
\ No newline at end of file +} |