From patchwork Wed Sep 9 13:54:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 1360642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bmk6B4Pjhz9sTS for ; Wed, 9 Sep 2020 23:54:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED465386F417; Wed, 9 Sep 2020 13:54:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 070C63857C68 for ; Wed, 9 Sep 2020 13:54:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 070C63857C68 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B3A6EB29F; Wed, 9 Sep 2020 13:54:48 +0000 (UTC) Date: Wed, 9 Sep 2020 15:54:29 +0200 From: Tom de Vries To: gcc-patches@gcc.gnu.org Subject: [committed][nvptx] Fix Wformat in nvptx_assemble_decl_begin Message-ID: <20200909135428.GA7921@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tobias Burnus Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, I'm running into this warning: ... src/gcc/config/nvptx/nvptx.c: In function \ ‘void nvptx_assemble_decl_begin(FILE*, const char*, const char*, \ const_tree, long int, unsigned int, bool)’: src/gcc/config/nvptx/nvptx.c:2229:29: warning: format ‘%d’ expects argument \ of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=] elt_size * BITS_PER_UNIT); ^ ... which I seem to have introduced in commit b9c7fe59f9f "[nvptx] Fix array dimension in nvptx_assemble_decl_begin", but not noticed due to configuring with --disable-build-format-warnings. Fix this by using the appropriate format. Rebuild cc1 on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Fix Wformat in nvptx_assemble_decl_begin gcc/ChangeLog: * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Fix Wformat warning. --- gcc/config/nvptx/nvptx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 6f393dfea01..0376ad6ce9f 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -2224,7 +2224,7 @@ nvptx_assemble_decl_begin (FILE *file, const char *name, const char *section, elt_size. */ init_frag.remaining = (size + elt_size - 1) / elt_size; - fprintf (file, "%s .align %d .u%d ", + fprintf (file, "%s .align %d .u" HOST_WIDE_INT_PRINT_UNSIGNED " ", section, align / BITS_PER_UNIT, elt_size * BITS_PER_UNIT); assemble_name (file, name);