Fix SIZEOF_MISMATCH 75/240075/2
authorhyunho <hhstark.kang@samsung.com>
Mon, 3 Aug 2020 05:48:58 +0000 (14:48 +0900)
committerhyunho <hhstark.kang@samsung.com>
Mon, 3 Aug 2020 07:50:13 +0000 (16:50 +0900)
Change-Id: I0b393ce563ece2c1b84decf3c0c60a5f41070538
Signed-off-by: hyunho <hhstark.kang@samsung.com>
unittest/src/test_widget_service.cc
unittest/src/test_widget_service_instance.cc

index d86edec..4f921d3 100644 (file)
@@ -31,6 +31,7 @@
 #include "mock/pkgmgr_info_mock.h"
 
 namespace {
+
 int __fake_system_info_get_platform_bool(const char* key, bool* value) {
   *value = true;
   return 0;
@@ -74,11 +75,8 @@ int __fake_chmod(const char *pathname, mode_t mode) {
 
 int __fake_aul_app_com_create(const char *endpoint, aul_app_com_permission_h permission,
     app_com_cb callback, void *user_data, aul_app_com_connection_h *connection) {
-  aul_app_com_connection_h *conn;
-
-  conn = (aul_app_com_connection_h *)malloc(sizeof(connection));
-  *connection = conn;
-  free(conn);
+  static int __not_null;
+  *connection = (aul_app_com_connection_h)&__not_null;
   return 0;
 }
 
index 0aa3bdf..4635165 100644 (file)
@@ -37,11 +37,8 @@ int __fake_aul_launch_app_async(const char *appid, bundle *kb) {
 
 int __fake_aul_app_com_create(const char *endpoint, aul_app_com_permission_h permission,
     app_com_cb callback, void *user_data, aul_app_com_connection_h *connection) {
-  aul_app_com_connection_h *conn;
-
-  conn = (aul_app_com_connection_h *)malloc(sizeof(connection));
-  *connection = conn;
-  free(conn);
+  static int __not_null;
+  *connection = (aul_app_com_connection_h)&__not_null;
   return 0;
 }