Patchwork linux-user: use uint64_t for getpid()

login
register
mail settings
Submitter Fabio Erculiani
Date Jan. 3, 2012, 4:08 p.m.
Message ID <1325606909-28875-1-git-send-email-lxnay@sabayon.org>
Download mbox | patch
Permalink /patch/134031/
State New
Headers show

Comments

Fabio Erculiani - Jan. 3, 2012, 4:08 p.m.
This fixes -Wformat warning introduced by
983da8bec44fd1ab5e9730f01e719b3849aa0a35

Signed-off-by: Fabio Erculiani <lxnay@sabayon.org>
---
 linux-user/syscall.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Alexander Graf - Jan. 3, 2012, 5:45 p.m.
On 03.01.2012, at 17:08, Fabio Erculiani wrote:

> This fixes -Wformat warning introduced by
> 983da8bec44fd1ab5e9730f01e719b3849aa0a35
> 
> Signed-off-by: Fabio Erculiani <lxnay@sabayon.org>

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


Alex

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f2af5d5..e563c00 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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]);