From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id pgVNMdIeh2GOYAAAWB0awg (envelope-from ) for ; Sat, 06 Nov 2021 20:33:22 -0400 Received: by simark.ca (Postfix, from userid 112) id B894A1F0C1; Sat, 6 Nov 2021 20:33:22 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 24A641EE1A for ; Sat, 6 Nov 2021 20:33:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DAB863857C72 for ; Sun, 7 Nov 2021 00:33:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAB863857C72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636245200; bh=nCst0nBVmTt9kLT9SKJ39t2ot6YZ4mlXNYUnbde1S0g=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=eUaEEx+WYDejMKAWuJxpfbSWrFvi3Xi+2WAGYK03cfJLljpzUKdZvZoze6PhenstX 25FzinpDJWx1ND+khCHUxOFZi2Qmv6+7V8X7u839bvRQHgJxjS8pSv5uzLf9DFaOAu 0ABf1S1VXIJFCeHbrwydjRaYHNPqsN7POsQxRBxI= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 83CAB3858406 for ; Sun, 7 Nov 2021 00:32:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 83CAB3858406 Received: by smtp.gentoo.org (Postfix, from userid 559) id 26D4C343158; Sun, 7 Nov 2021 00:32:59 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 2/6] sim: sh: fix unused-value warnings Date: Sat, 6 Nov 2021 20:32:50 -0400 Message-Id: <20211107003254.4298-2-vapier@gentoo.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211107003254.4298-1-vapier@gentoo.org> References: <20211107003254.4298-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" These macro expansions are deliberate in not using the computed value so that they trigger side-effects (possible invalid memory accesses) but while otherwise being noops. Add a (void) cast so the compiler knows these are intentional. --- sim/sh/gencode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c index c922cfe43b96..ae44bc8825b8 100644 --- a/sim/sh/gencode.c +++ b/sim/sh/gencode.c @@ -1239,17 +1239,17 @@ static op tab[] = }, { "", "n", "ocbi @", "0000nnnn10010011", - "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */", + "(void) RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */", "/* FIXME: Cache not implemented */", }, { "", "n", "ocbp @", "0000nnnn10100011", - "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */", + "(void) RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */", "/* FIXME: Cache not implemented */", }, { "", "n", "ocbwb @", "0000nnnn10110011", - "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */", + "(void) RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop. */", "/* FIXME: Cache not implemented */", }, -- 2.33.0