From: INSUN PYO Date: Tue, 28 Jan 2020 11:20:34 +0000 (+0900) Subject: Fix build warning X-Git-Tag: submit/tizen/20200131.025416~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90f4b6b9d548adf03eaa99d9a39440f1c66f516e;p=platform%2Fcore%2Fsystem%2Fdeviced.git Fix build warning Change-Id: If9c91e88101653de559727d8685f6625a7329d5c --- diff --git a/conf/org.tizen.system.deviced.conf b/conf/org.tizen.system.deviced.conf index fb3076f..cd89a24 100644 --- a/conf/org.tizen.system.deviced.conf +++ b/conf/org.tizen.system.deviced.conf @@ -4,34 +4,28 @@ - - - + + + - + - - - + + + - - + + - + @@ -44,22 +38,22 @@ + privilege="http://tizen.org/privilege/display"/> + privilege="http://tizen.org/privilege/power"/> + privilege="http://tizen.org/privilege/reboot"/> + privilege="http://tizen.org/privilege/led"/> + privilege="http://tizen.org/privilege/use_ir"/> + privilege="http://tizen.org/privilege/internal/default/platform"/> - - + + @@ -67,8 +61,8 @@ - - + + diff --git a/src/display/lock-detector.c b/src/display/lock-detector.c index efcad4f..5ca0642 100644 --- a/src/display/lock-detector.c +++ b/src/display/lock-detector.c @@ -258,7 +258,6 @@ void print_lock_info_list(int fd) dd_list *l; long time; char cur_buf[30], lock_buf[30], unlock_buf[30], buf[255]; - char *tmp; int ret; if (!lock_info_list) diff --git a/src/power/power-handler.c b/src/power/power-handler.c index 4227993..52caa68 100644 --- a/src/power/power-handler.c +++ b/src/power/power-handler.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -317,6 +318,7 @@ static void poweroff_remove_handle(pid_t pid) static gboolean poweroff_timeout_cb(void *data) { + char timeout[50] = {0,}; pid_t pid = (pid_t)((intptr_t)data); poweroff_remove_handle(pid); @@ -333,7 +335,8 @@ static gboolean poweroff_timeout_cb(void *data) } // Watchdog timeout 90 -> 30 sec to reduce delay from unexpected poweroff failure. - sd_notify(0, "WATCHDOG_USEC=%llu", (unsigned long long)POWEROFF_WAIT_SYSTEMD_MS*1000); + snprintf(timeout, sizeof(timeout), "WATCHDOG_USEC=%llu", (unsigned long long)POWEROFF_WAIT_SYSTEMD_MS*1000); + sd_notify(0, timeout); make_power_flag(poweroff_opt.type, poweroff_opt.option); diff --git a/src/touchscreen/touchscreen.c b/src/touchscreen/touchscreen.c index ea33bb6..ac0175e 100644 --- a/src/touchscreen/touchscreen.c +++ b/src/touchscreen/touchscreen.c @@ -80,11 +80,12 @@ static int touchscreen_powersaving(enum ps_mode mode) else return -EINVAL; - if (touchscreen_dev && touchscreen_dev->set_powersaving) + if (touchscreen_dev && touchscreen_dev->set_powersaving) { ret = touchscreen_dev->set_powersaving(state); - if (ret < 0) { - _E("Failed to set touch powersaving node."); - return -EIO; + if (ret < 0) { + _E("Failed to set touch powersaving node."); + return -EIO; + } } _I("Set touch powersaving %s.", state ? "ON" : "OFF");