Efl debug daemon: Fix Warning on Windows.
authorVincent Torri <vincent.torri@gmail.com>
Thu, 2 Jul 2015 20:24:44 +0000 (22:24 +0200)
committerTom Hacohen <tom@stosb.com>
Fri, 3 Jul 2015 15:23:06 +0000 (16:23 +0100)
According to the Open Group, pid_t is signed integer and can not
be larger than a long

src/bin/efl/efl_debugd.c

index a46d423..a1025fb 100644 (file)
@@ -127,8 +127,8 @@ _do(Client *c, char *op, unsigned char *d, int size)
 
                   send_cli(c2->client, "EVON", NULL, 0);
                   c2->evlog_fetch_timer = ecore_timer_add(0.2, _cb_evlog, c2);
-                  snprintf(buf, sizeof(buf), "%s/efl_debug_evlog-%i.log",
-                           getenv("HOME"), c2->pid);
+                  snprintf(buf, sizeof(buf), "%s/efl_debug_evlog-%ld.log",
+                           getenv("HOME"), (long)c2->pid);
                   c2->evlog_file = fopen(buf, "w");
                }
           }