diff options
author | YoungHun Kim <yh8004.kim@samsung.com> | 2019-09-30 16:09:19 +0900 |
---|---|---|
committer | YoungHun Kim <yh8004.kim@samsung.com> | 2019-10-04 17:02:46 +0900 |
commit | 36794f38e13ad054f3578bf5894186a8bb2f613f (patch) | |
tree | bbee3bdb3a3d676efb8c1f1f933245d16af5a0c6 | |
parent | 8e2e4707e4f441da9f9e91ce6720a06495baf2f0 (diff) | |
download | murphy-36794f38e13ad054f3578bf5894186a8bb2f613f.tar.gz murphy-36794f38e13ad054f3578bf5894186a8bb2f613f.tar.bz2 murphy-36794f38e13ad054f3578bf5894186a8bb2f613f.zip |
Fix the build warningsubmit/tizen_4.0/20191004.084131accepted/tizen/4.0/unified/20191015.052706accepted/tizen_4.0_unified
Change-Id: I532e54feccda18ba617e661018404bedf9fdf7e9
-rw-r--r-- | packaging/murphy.spec | 2 | ||||
-rw-r--r-- | src/common/glib-glue.c | 4 | ||||
-rw-r--r-- | src/common/json.h | 2 | ||||
-rw-r--r-- | src/common/tests/mask-test.c | 7 | ||||
-rw-r--r-- | src/core/lua-utils/error.h | 3 |
5 files changed, 9 insertions, 9 deletions
diff --git a/packaging/murphy.spec b/packaging/murphy.spec index 0cc4b5f..ecf897a 100644 --- a/packaging/murphy.spec +++ b/packaging/murphy.spec @@ -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/ diff --git a/src/common/glib-glue.c b/src/common/glib-glue.c index ef6e6a8..a1f7275 100644 --- a/src/common/glib-glue.c +++ b/src/common/glib-glue.c @@ -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. */ diff --git a/src/common/json.h b/src/common/json.h index 746a6ef..c6d5cbc 100644 --- a/src/common/json.h +++ b/src/common/json.h @@ -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) diff --git a/src/common/tests/mask-test.c b/src/common/tests/mask-test.c index e4db6d0..2d20966 100644 --- a/src/common/tests/mask-test.c +++ b/src/common/tests/mask-test.c @@ -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)) diff --git a/src/core/lua-utils/error.h b/src/core/lua-utils/error.h index ea5678a..cde95a2 100644 --- a/src/core/lua-utils/error.h +++ b/src/core/lua-utils/error.h @@ -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, ...) \ |