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