From: INSUN PYO Date: Thu, 9 Apr 2020 00:19:43 +0000 (+0900) Subject: Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0 X-Git-Tag: submit/tizen/20200429.062821^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7518a195e9d9f2f45a5f36b31350fed299b2fcab;p=platform%2Fcore%2Fsystem%2Flibsyscommon.git Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0 If NULL is passed as the %s argument of dlog, gcc reports an error. Change-Id: Id70287787362f152efbbf5935c76646500321188 --- diff --git a/src/libgdbus/dbus-system.c b/src/libgdbus/dbus-system.c index 8038709..f57f147 100644 --- a/src/libgdbus/dbus-system.c +++ b/src/libgdbus/dbus-system.c @@ -344,7 +344,7 @@ static void _dbus_handle_remove_bus_name(dbus_handle_s *handle, const char *bus_ dbus_name *dn = NULL; if (!bus_name) { - _E("wrong bus_name %s", bus_name); + _E("wrong bus_name is null"); return ; } if (!dh) { @@ -2698,7 +2698,7 @@ int dbus_handle_watch_name(const char *name, guint id = 0; if (!name) { - _E("wrong name name %s", name); + _E("wrong name name is null"); return -1; } if (!name_appeared_handler && !name_vanished_handler) { @@ -2778,7 +2778,7 @@ char **dbus_handle_get_owner_list(dbus_handle_h handle, const char *bus_name) int i = 0; if (!bus_name) { - _E("wrong parameter bus_name(%s)", bus_name); + _E("wrong parameter bus_name is null"); return NULL; } diff --git a/src/libgdbus/dbus-systemd.c b/src/libgdbus/dbus-systemd.c index 4fd961b..4597e15 100644 --- a/src/libgdbus/dbus-systemd.c +++ b/src/libgdbus/dbus-systemd.c @@ -213,7 +213,8 @@ static int _change_suffix(const char *name, int ret = 0; if (!name || !suffix || !new_name) { - _E("Wrong param name:%s, suffix:%s, new_name:%s", name, suffix, new_name); + _E("Wrong param name:%s, suffix:%s, new_name:%s (null)", + name ? : "(null)", suffix ? : "(null)", new_name ? "not" : ""); return -EINVAL; } @@ -298,7 +299,7 @@ static int _systemd_control_unit(const char *name, int ret = 0; if (!name || !method) { - _E("Wrong param name %s, method %s", name, method); + _E("Wrong param name %s, method %s", name ? : "(null)", method ? : "(null)"); return -EINVAL; } if (timeout_msec < -1) {