From patchwork Tue Dec 2 22:37:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 417167 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 30B8214019D for ; Wed, 3 Dec 2014 09:38:11 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=vzUzKxkO0WBQQeqmthOr/OYIsCsst /Qo6VKghE3g+dDqRuM/+ve+HWH+EU6S3eAJnfqyKkFiR3CaLBGJ2IWDXXXsQTbBD zKGwY89QPEgKLaAFYb/l6QoVC025GBSKvADzyQPYXp6+RenfYUga6PNLeSvj4jsd N0Ql5HPMHUD/ig= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=3o7V19vQN8Lbj3Gc2EZoazkL6JU=; b=XPw 5kwYEDsJKSA57Qe6mjFE7/kMvoO1LIBRyXdSd+Xxm/p30Bzesgm2eaEXatNvH77Z gN7JOGFjfjdKtnNT7GErPDt168uODabfJr5w5CIo8xOMfJTTbSqTBm3Zgbu0DwAM r1NRR3AQVuLkRp53Xh3uYW0YhQuyPzW1TSLvZfTk= Received: (qmail 19497 invoked by alias); 2 Dec 2014 22:38:06 -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 19485 invoked by uid 89); 2 Dec 2014 22:38:05 -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: Tue, 2 Dec 2014 22:37:58 +0000 From: Joseph Myers To: Subject: Fix warning in nptl/tst-stack4.c Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 This patch fixes a warning in a test that was added since my recent warning cleanup: tst-stack4.c: In function 'dso_process': tst-stack4.c:64:7: warning: format '%i' expects argument of type 'int', but argument 3 has type 'uintptr_t' [-Wformat=] The original variable has type int then is cast to uintptr_t, and from there to void *, to pass it to a thread, so reversing the process by casting to uintptr_t and then to int is natural; this patch does so. Tested for x86_64. 2014-12-02 Joseph Myers * nptl/tst-stack4.c (dso_process): Use int not uintptr_t for t. diff --git a/nptl/tst-stack4.c b/nptl/tst-stack4.c index d9c8df2..3b72693 100644 --- a/nptl/tst-stack4.c +++ b/nptl/tst-stack4.c @@ -56,7 +56,7 @@ dso_process (void * p) function fun_vec[DSO_SHARED_FILES]; char dso_path[DSO_SHARED_FILES][100]; int dso; - uintptr_t t = (uintptr_t) p; + int t = (int) (uintptr_t) p; /* Open DSOs and get a function. */ for (dso = 0; dso < DSO_SHARED_FILES; dso++)