From patchwork Wed Nov 26 13:32:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 3943 Received: (qmail 24409 invoked by alias); 26 Nov 2014 13:32:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 24362 invoked by uid 89); 26 Nov 2014 13:32:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 26 Nov 2014 13:32:52 +0000 From: Joseph Myers To: Subject: Fix nptl/tst-cancel-self-cancelstate.c warning Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 This patch fixes "../sysdeps/nptl/pthread.h:670:26: warning: initialization discards 'volatile' qualifier from pointer target type" arising when building nptl/tst-cancel-self-cancelstate.c. The problem is passing a volatile int * to a macro expecting void *; the patch adds an explicit cast. Tested for x86_64. 2014-11-26 Joseph Myers * nptl/tst-cancel-self-cancelstate.c (do_test): Cast argument of pthread_cleanup_push to void *. diff --git a/nptl/tst-cancel-self-cancelstate.c b/nptl/tst-cancel-self-cancelstate.c index 3dce967..0defd0b 100644 --- a/nptl/tst-cancel-self-cancelstate.c +++ b/nptl/tst-cancel-self-cancelstate.c @@ -29,7 +29,7 @@ do_test (void) int ret = 0; volatile int should_fail = 1; - pthread_cleanup_push (cleanup, &should_fail); + pthread_cleanup_push (cleanup, (void *) &should_fail); if ((ret = pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL)) != 0) {