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