Skip to contentSkip to conversation

linux-user: use uint64_t for getpid()

PATCH In review Fabio Erculiani 2 participants 2 messages Jan 3, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: use uint64_t for getpid()

This fixes -Wformat warning introduced by
983da8bec44fd1ab5e9730f01e719b3849aa0a35

---
 linux-user/syscall.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
linux-user/syscall.c +2 -1
index f2af5d5..e563c00 100644
@@ -4680,7 +4680,8 @@ static int open_self_stat(void *cpu_env, int fd)
 
       if (i == 0) {
         /* pid */
-        snprintf(buf, sizeof(buf), "%"PRId64 " ", getpid());
+        val = getpid();
+        snprintf(buf, sizeof(buf), "%"PRId64 " ", val);
       } else if (i == 1) {
         /* app name */
         snprintf(buf, sizeof(buf), "(%s) ", ts->bprm->argv[0]);
Signature · 1 line
1.7.7
#1 lore raw
Quoted 4 lines · Fabio Erculiani

This fixes -Wformat warning introduced by
983da8bec44fd1ab5e9730f01e719b3849aa0a35

As long as your original patch isn't applied yet, please just respin it and submit v2 or v3 of your original patch :).

Alex