From patchwork Tue Jan 23 10:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 190823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp228574dyi; Tue, 23 Jan 2024 02:02:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8yYPJVoLV1J5N0xX3l6OxF+pMoGmssQMe05/l9g8haQK2/wcTmiVRNGnxu41O4HduCWhF X-Received: by 2002:a05:620a:f95:b0:783:9ab3:d38f with SMTP id b21-20020a05620a0f9500b007839ab3d38fmr3859674qkn.89.1706004131634; Tue, 23 Jan 2024 02:02:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706004131; cv=pass; d=google.com; s=arc-20160816; b=q5pF96mBkyRMgJi3PIe27E/X5gbOja4Bx4jKsk2qteObQvOdCmsdMh6Gv8DocQwzeJ UR6Q+0fvFkUDtzbns5Ke8wZfk0eFEbpqMyIPvPeOUNqbD6SSohk87g4i6jul7eaXaCs3 FvApFplmj5tzmbneO++lxhZ7z1ctl8OHxUVTxsBjQjVLu8EiRrpSamcCaax4Wz+fAmss 06617vefVHXulDinOUzTjTmb24hYmm7DYGQ+d6SrsaG4FxSAuf4m+mIoXfCRVs4+Lwyn TqYfqoagZ5VXR7lX6GVmTMr0hu/90CuZRhc12tx2BGsScusHKQSZtbVjUtWp+TPQsRaN v3fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=tekAg4sSRB7/q9EgVQCvq4TkTF7Kk16mK9/zJaMiQlY=; fh=tSQ+hzHKKFtnNkzMSfJneXJS2u9U271WA5DrBrZR+c0=; b=yHuAEeLOgcsFgryOj2NNnPAAyNai7HwHzX+W2wY5sWgYqq5IVe4NTXSYHsw7vCmzbt 49fwYaLi1OqoyyBeCSujjZJCzjh3SDPZ/l5EeV2JccepNN289XXUGVAK3coKeDFIkUAz WNKR5rwLZvYZPd//J9VOm22KURcVbNNhEbrF/cqDLzV5j/vzBDBEuzQBMmg+W90ETijt leV3pYTKc3aFNwQTIKne9/xW3k4D8Vdoewz658texzNoLxKvWVWXqkHjIY/pL+uRI0y2 WoFQo+r6efiexTNE+uR8nUTos9tiNOwrCbrROrs3+YS7poF7/831JWml78i51FScml2R HMqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CjjAGVCj; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y8-20020a05620a25c800b00781555ae8basi8022265qko.210.2024.01.23.02.02.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:02:11 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CjjAGVCj; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D6863858431 for ; Tue, 23 Jan 2024 10:02:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 182CF3858C5E for ; Tue, 23 Jan 2024 10:01:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 182CF3858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 182CF3858C5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706004083; cv=none; b=C42O6GSof6L9jKP8O6TajF89b/EbneteYDeDvof13bkGmQkUicvbE60xG2Cz8DTOWlrYZk5t9LtK8n8WDfBIr6uOaUFQR7mzd2MJ1mu/2nB5JLayggC5yluVGNF6R0wqQBc2sfBJl2oswRQJUCs7ys+wUKz6ZzFWGZUFkUUl3EM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706004083; c=relaxed/simple; bh=ku3peSJOoUOqgS4GK7Ob+Cx/y306M7v64TK7TwIR0cE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=B8L6ktqSwf78YkzIPtIhKWrmZzT7tmNWJvDVEwyUcNUi7ByMmHQM9hcM3cSXMsrryOD71rrctdzNcQ0vYFqJHJpISY20WnxX5MOj5nct3JGpCS23jafQ662jEIbUCHe2M3hXAGWOW+EudE36xfL6Vtk7jEvHOCUl7ZnqFt6Lab8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706004081; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tekAg4sSRB7/q9EgVQCvq4TkTF7Kk16mK9/zJaMiQlY=; b=CjjAGVCj+aZ9kfpGRbLD8bdvBAfIH3iU8VZv0x8OgQUEdO52vDYyn9hwy81D3nHPZmmB+B yAlGBO9a1ohkJLI+IISt2X7mPtuOWD4i8bnTCNGPnXDepJoe+tnkX4B+V2XMYiZ+7CxAuY MjBiIZjQQ+q5z1p3gKTSXFHO52s/T5E= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-248-VfgmVwbxMGC4e32otozC-g-1; Tue, 23 Jan 2024 05:01:20 -0500 X-MC-Unique: VfgmVwbxMGC4e32otozC-g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ACB791C05EBD; Tue, 23 Jan 2024 10:01:19 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6661D2026D66; Tue, 23 Jan 2024 10:01:19 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 40NA1G7Q1250486 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 23 Jan 2024 11:01:17 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 40NA1Gn31250485; Tue, 23 Jan 2024 11:01:16 +0100 Date: Tue, 23 Jan 2024 11:01:15 +0100 From: Jakub Jelinek To: Andrew Stubbs Cc: gcc-patches@gcc.gnu.org, Tobias Burnus Subject: [PATCH] gcn: Fix a warning Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788874988011988408 X-GMAIL-MSGID: 1788874988011988408 Hi! I see ../../gcc/config/gcn/gcn.cc: In function ‘void gcn_hsa_declare_function_name(FILE*, const char*, tree)’: ../../gcc/config/gcn/gcn.cc:6568:67: warning: unused parameter ‘decl’ [-Wunused-parameter] 6568 | gcn_hsa_declare_function_name (FILE *file, const char *name, tree decl) | ~~~~~^~~~ warning presumably since r14-6945-gc659dd8bfb55e02a1b97407c1c28f7a0e8f7f09b Previously, the argument was anonymous, but now it is passed to a macro which ignores it, so I think we should go with ATTRIBUTE_UNUSED. Ok for trunk? 2024-01-23 Jakub Jelinek * config/gcn/gcn.cc (gcn_hsa_declare_function_name): Add ATTRIBUTE_UNUSED to decl. Jakub --- gcc/config/gcn/gcn.cc.jj 2024-01-08 16:13:18.625940507 +0100 +++ gcc/config/gcn/gcn.cc 2024-01-23 10:47:33.945954494 +0100 @@ -6565,7 +6565,8 @@ output_file_start (void) comments that pass information to mkoffload. */ void -gcn_hsa_declare_function_name (FILE *file, const char *name, tree decl) +gcn_hsa_declare_function_name (FILE *file, const char *name, + tree decl ATTRIBUTE_UNUSED) { int sgpr, vgpr, avgpr; bool xnack_enabled = TARGET_XNACK;