Fix build warning 12/223312/7
authorINSUN PYO <insun.pyo@samsung.com>
Tue, 28 Jan 2020 11:20:34 +0000 (20:20 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 29 Jan 2020 01:11:33 +0000 (01:11 +0000)
Change-Id: If9c91e88101653de559727d8685f6625a7329d5c

conf/org.tizen.system.deviced.conf
src/display/lock-detector.c
src/power/power-handler.c
src/touchscreen/touchscreen.c

index fb3076f..cd89a24 100644 (file)
@@ -4,34 +4,28 @@
     <policy user="root">
         <allow own="org.tizen.system.deviced"/>
         <allow send_destination="org.tizen.system.deviced"/>
-        <allow send_type="signal"
-            send_path="/Org/Tizen/System/DeviceD/Display"
-            send_interface="org.tizen.system.deviced.display"/>
-        <allow send_type="signal"
-            send_path="/Org/Tizen/System/DeviceD/Time"
-            send_interface="org.tizen.system.deviced.Time"/>
-        <allow send_type="signal"
-            send_path="/Org/Tizen/System/DeviceD/Battery"
-            send_interface="org.tizen.system.deviced.Battery"/>
+        <allow send_type="signal" send_path="/Org/Tizen/System/DeviceD/Display" send_interface="org.tizen.system.deviced.display"/>
+        <allow send_type="signal" send_path="/Org/Tizen/System/DeviceD/Time" send_interface="org.tizen.system.deviced.Time"/>
+        <allow send_type="signal" send_path="/Org/Tizen/System/DeviceD/Battery" send_interface="org.tizen.system.deviced.Battery"/>
     </policy>
 
     <policy user="service_fw">
-      <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.BatteryMonitor" send_member="GetBMData"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.BatteryMonitor" send_member="GetBMData"/>
     </policy>
 
     <policy user="system_fw">
-      <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery" send_member="power_supply"/>
-      <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.ExtCon"/>
-      <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.display" send_member="AutoBrightnessChanged"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery" send_member="power_supply"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.ExtCon"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.display" send_member="AutoBrightnessChanged"/>
     </policy>
 
     <policy user="security_fw">
-      <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="getcontrol"/>
-      <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="control"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="getcontrol"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="control"/>
     </policy>
 
     <policy user="app_fw">
-       <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Tzip"/>
+        <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Tzip"/>
     </policy>
 
     <policy group="users">
         <allow send_destination="org.tizen.system.deviced" send_interface="org.freedesktop.DBus.Properties" send_member="GetAll"/>
 
         <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.display"
-                privilege="http://tizen.org/privilege/display"/>
+            privilege="http://tizen.org/privilege/display"/>
         <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.power"
-                privilege="http://tizen.org/privilege/power"/>
+            privilege="http://tizen.org/privilege/power"/>
         <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.PowerOff"
-                privilege="http://tizen.org/privilege/reboot"/>
+            privilege="http://tizen.org/privilege/reboot"/>
         <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Led"
-                privilege="http://tizen.org/privilege/led"/>
+            privilege="http://tizen.org/privilege/led"/>
         <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.ir"
-                privilege="http://tizen.org/privilege/use_ir"/>
+            privilege="http://tizen.org/privilege/use_ir"/>
         <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Csa"
-                privilege="http://tizen.org/privilege/internal/default/platform"/>
+            privilege="http://tizen.org/privilege/internal/default/platform"/>
 
         <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery"/>
-          <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery" send_member="power_supply"/>
-          <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery" send_member="SetLowbatLevel"
-                 privilege="http://tizen.org/privilege/systemsettings.admin"/>
+        <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery" send_member="power_supply"/>
+        <check send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Battery" send_member="SetLowbatLevel"
+            privilege="http://tizen.org/privilege/systemsettings.admin"/>
 
         <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Core"/>
         <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.ExtCon"/>
@@ -67,8 +61,8 @@
         <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.LowPower"/>
 
         <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti"/>
-          <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="getcontrol"/>
-          <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="control"/>
+        <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="getcontrol"/>
+        <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.SysNoti" send_member="control"/>
 
         <deny send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Tzip"/>
         <allow send_destination="org.tizen.system.deviced" send_interface="org.tizen.system.deviced.Usb"/>
index efcad4f..5ca0642 100644 (file)
@@ -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)
index 4227993..52caa68 100644 (file)
@@ -33,6 +33,7 @@
 #include <eventsystem.h>
 #include <stdbool.h>
 #include <signal.h>
+#include <systemd/sd-daemon.h>
 #include <libsyscommon/dbus-system.h>
 #include <libsyscommon/dbus-systemd.h>
 
@@ -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);
 
index ea33bb6..ac0175e 100644 (file)
@@ -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");