c6d234
commit 909e16d96064708b43170eeb01135315f540e6ff
c6d234
Author: Joseph Myers <joseph@codesourcery.com>
c6d234
Date:   Tue Dec 2 22:48:59 2014 +0000
c6d234
c6d234
    Fix warning in nptl/tst-stack4.c.
c6d234
    
c6d234
    This patch fixes a warning in a test that was added since my recent
c6d234
    warning cleanup:
c6d234
    
c6d234
    tst-stack4.c: In function 'dso_process':
c6d234
    tst-stack4.c:64:7: warning: format '%i' expects argument of type 'int', but argument 3 has type 'uintptr_t' [-Wformat=]
c6d234
    
c6d234
    The original variable has type int then is cast to uintptr_t, and from
c6d234
    there to void *, to pass it to a thread, so reversing the process by
c6d234
    casting to uintptr_t and then to int is natural; this patch does so.
c6d234
    
c6d234
    Tested for x86_64.
c6d234
    
c6d234
            * nptl/tst-stack4.c (dso_process): Use int not uintptr_t for t.
c6d234
c6d234
diff --git a/nptl/tst-stack4.c b/nptl/tst-stack4.c
c6d234
index d9c8df2c8d35e8a9..3b726936461408b3 100644
c6d234
--- a/nptl/tst-stack4.c
c6d234
+++ b/nptl/tst-stack4.c
c6d234
@@ -56,7 +56,7 @@ dso_process (void * p)
c6d234
   function fun_vec[DSO_SHARED_FILES];
c6d234
   char dso_path[DSO_SHARED_FILES][100];
c6d234
   int dso;
c6d234
-  uintptr_t t = (uintptr_t) p;
c6d234
+  int t = (int) (uintptr_t) p;
c6d234
 
c6d234
   /* Open DSOs and get a function.  */
c6d234
   for (dso = 0; dso < DSO_SHARED_FILES; dso++)