Fix warining message \n - format '%s' expects argument of type 'char *', but use... 51/66251/1 accepted/tizen/common/20160420.140308 accepted/tizen/ivi/20160418.124607 accepted/tizen/mobile/20160418.124400 accepted/tizen/tv/20160418.124407 accepted/tizen/wearable/20160418.124531 submit/tizen/20160418.074213 submit/tizen/20160418.103913
authorYunmi Ha <yunmi.ha@samsung.com>
Mon, 18 Apr 2016 05:39:36 +0000 (14:39 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Mon, 18 Apr 2016 05:39:36 +0000 (14:39 +0900)
Change-Id: I3b1d74e1b66bcccc7c1a6bcb0bbbcc3f247b488c

src/plugins/default/tlm-account-plugin-default.c
src/plugins/default/tlm-auth-plugin-default.c
src/utils/tlm-launcher.c

index f327342..3d4d2ff 100755 (executable)
@@ -180,8 +180,9 @@ _is_valid_user (TlmAccountPlugin *plugin, const gchar *user_name)
 
     if (!pwd_entry) {
         gchar strerr_buf[MAX_STRERROR_LEN] = {0,};
+        strerror_r(errno, strerr_buf, MAX_STRERROR_LEN);
         DBG("Could not get info for user '%s', error : %s",
-            user_name, strerror_r(errno, strerr_buf, MAX_STRERROR_LEN));
+            user_name, strerr_buf);
         if (buf)
             g_free(buf);
         return FALSE;
index 42f49a7..6740830 100755 (executable)
@@ -177,7 +177,8 @@ tlm_auth_plugin_default_init (TlmAuthPluginDefault *self)
 
     if (sigaction(SIGUSR1, &sa, NULL) != 0) {
         gchar strerr_buf[MAX_STRERROR_LEN] = {0,};
-        WARN ("assert(sigaction()) : %s", strerror_r(errno, strerr_buf, MAX_STRERROR_LEN));
+        strerror_r(errno, strerr_buf, MAX_STRERROR_LEN);
+        WARN ("assert(sigaction()) : %s", strerr_buf);
     }
 
     tlm_log_init("TLM_AUTH_PLUGIN");
index c13004a..51546f6 100755 (executable)
@@ -162,13 +162,15 @@ static void _tlm_launcher_process (TlmLauncher *l)
         if (!argv)
           ERR("Getting argv failure");
         if ((child_pid = fork()) < 0) {
-            ERR("fork() failed: %s", strerror_r(errno, strerr_buf, MAX_STRERROR_LEN));
+            strerror_r(errno, strerr_buf, MAX_STRERROR_LEN);
+            ERR("fork() failed: %s", strerr_buf);
         } else if (child_pid == 0) {
             /* child process */
             INFO("Launching command : %s, pid: %d, ppid: %d\n",
                 argv[0], getpid (), getppid ());
             execvp(argv[0], argv);
-            WARN("exec failed: %s", strerror_r(errno, strerr_buf, MAX_STRERROR_LEN));
+            strerror_r(errno, strerr_buf, MAX_STRERROR_LEN);
+            WARN("exec failed: %s", strerr_buf);
         } else if (control == 'M') {
           ChildInfo *info = g_slice_new0 (ChildInfo);
           if (!info) {
@@ -239,7 +241,8 @@ int main (int argc, char *argv[])
 
   if (!(launcher.fp = fopen(file, "r"))) {
     gchar strerr_buf[MAX_STRERROR_LEN] = {0,};
-    ERR("Failed to open file '%s':%s", file, strerror_r(errno, strerr_buf, MAX_STRERROR_LEN));
+    strerror_r(errno, strerr_buf, MAX_STRERROR_LEN);
+    ERR("Failed to open file '%s':%s", file, strerr_buf);
     _tlm_launcher_deinit (&launcher);
     return 0;
   }