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