25845f
commit 59ef17152b1ad9a4c4d618ec085586e3e14f6e94
25845f
Author: Joseph Myers <joseph@codesourcery.com>
25845f
Date:   Wed Nov 26 16:07:39 2014 +0000
25845f
25845f
    Fix nptl/tst-cancel-self-cancelstate.c warning.
25845f
    
25845f
    This patch fixes "../sysdeps/nptl/pthread.h:670:26: warning:
25845f
    initialization discards 'volatile' qualifier from pointer target type"
25845f
    arising when building nptl/tst-cancel-self-cancelstate.c.  The problem
25845f
    is passing a volatile int * to a macro expecting void *; the patch
25845f
    adds an explicit cast.
25845f
    
25845f
    Tested for x86_64.
25845f
    
25845f
            * nptl/tst-cancel-self-cancelstate.c (do_test): Cast argument of
25845f
            pthread_cleanup_push to void *.
25845f
25845f
diff --git a/nptl/tst-cancel-self-cancelstate.c b/nptl/tst-cancel-self-cancelstate.c
25845f
index c82e6f3cedd1745b..21314a2efb00dbf1 100644
25845f
--- a/nptl/tst-cancel-self-cancelstate.c
25845f
+++ b/nptl/tst-cancel-self-cancelstate.c
25845f
@@ -29,7 +29,7 @@ do_test (void)
25845f
   int ret = 0;
25845f
   volatile int should_fail = 1;
25845f
 
25845f
-  pthread_cleanup_push (cleanup, &should_fail);
25845f
+  pthread_cleanup_push (cleanup, (void *) &should_fail);
25845f
 
25845f
   if ((ret = pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL)) != 0)
25845f
     {