Fix the build warning 55/214955/2 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.011151 accepted/tizen/5.5/unified/mobile/hotfix/20201027.073843 accepted/tizen/unified/20191010.032753 submit/tizen/20191004.080012 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 tizen_5.5.m2_release
authorYoungHun Kim <yh8004.kim@samsung.com>
Mon, 30 Sep 2019 07:09:19 +0000 (16:09 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Fri, 4 Oct 2019 07:52:09 +0000 (16:52 +0900)
Change-Id: I532e54feccda18ba617e661018404bedf9fdf7e9

packaging/murphy.spec
src/common/glib-glue.c
src/common/json.h
src/common/tests/mask-test.c
src/core/lua-utils/error.h

index 0cc4b5ffb423985d8d608a64322d5a790fef5de3..ecf897a88942e6606c454de4e18b46e653c063b3 100644 (file)
@@ -29,7 +29,7 @@
 Summary: Resource policy framework
 Name: murphy
 Version: 0.0.75
-Release: 16
+Release: 17
 License: BSD-3-Clause
 Group: System/Service
 URL: http://01.org/murphy/
index ef6e6a89fe57986925692dfc7f7be011e6d74078..a1f7275c539a128bec4dc7f72b4f4e7602bce792 100644 (file)
@@ -386,7 +386,7 @@ static void *add_defer(void *glue_data,
     dfr_t *d;
     glib_glue_t *glue = (glib_glue_t *)glue_data;
 
-    g_return_if_fail(glue);
+    g_return_val_if_fail(glue, NULL);
 
     g_mutex_lock(&glue->glue_internal_lock);
     d = mrp_allocz(sizeof(*d));
@@ -497,7 +497,7 @@ static gpointer
 thread_main (gpointer data)
 {
     glib_glue_t *glue = (glib_glue_t *)data;
-    g_return_if_fail(glue);
+    g_return_val_if_fail(glue, NULL);
     GMainContext *thread_main_context = g_main_loop_get_context(glue->gml);
 
     /* Set up the thread’s context and run it. */
index 746a6ef2e209f1de19db434951568de032a33861..c6d5cbc65d7307fc2682770d67c167f77388aa8f 100644 (file)
@@ -235,7 +235,7 @@ int mrp_json_array_get_item(mrp_json_t *a, int idx, mrp_json_type_t type, ...);
 #define mrp_json_foreach_member(o, _k, _v, it)                  \
     for (it.entry = json_object_get_object((o))->head;          \
          (it.entry ?                                            \
-          (_k = it.key = it.entry->k,                           \
+          (_k = it.key = (char *)it.entry->k,                   \
            _v = it.val = (mrp_json_t *)it.entry->v,             \
            it.entry) : 0);                                      \
          it.entry = it.entry->next)
index e4db6d023bf490c77bd884f86ece1518bd8465ac..2d20966ae2adc2c918471f4c9940644b2cce134c 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <time.h>
+#include <inttypes.h>
 #include <sys/types.h>
 
 #include <murphy/common/mask.h>
@@ -20,7 +21,7 @@ int main(int argc, char *argv[])
     bits = 0x17;
     bits <<= 35;
     n = mrp_ffsll(bits);
-    printf("ffsl(0x%lx) = %d\n", bits, n);
+    printf("ffsl(0x%"PRIu64") = %d\n", bits, n);
 
     for (i = 0; i < cnt; i++) {
         bits = (unsigned long)rand();
@@ -30,11 +31,11 @@ int main(int argc, char *argv[])
         if (n > 1) {
             if ((bits & clr) != 0) {
             fail:
-                printf("ffs(0x%lx) = %d: FAIL\n", bits, n);
+                printf("ffs(0x%"PRIu64") = %d: FAIL\n", bits, n);
                 exit(1);
             }
             else
-                printf("ffs(0x%lx) = %d: OK\n", bits, n);
+                printf("ffs(0x%"PRIu64") = %d: OK\n", bits, n);
         }
 
         if (n != __builtin_ffsl(bits))
index ea5678a939fe76bc43bbaba8cbffbe51e3f2267b..cde95a20bc7c70c4577179d5402f374d03ce2d03 100644 (file)
@@ -64,8 +64,7 @@
 
 /** Macro to pass up, throw, or print an error. */
 #define mrp_lua_error(_retval, _L, ...)                                 \
-    mrp_lua_set_error(_L, _errb, _errl, __VA_ARGS__),                   \
-        _retval
+    mrp_lua_set_error(_L, _errb, _errl, __VA_ARGS__)                   \
 
 /** Macro to throw an error/exception. */
 #define mrp_lua_throw(_L, ...)                                          \