From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BIJFL9leb2C4GgAAWB0awg (envelope-from ) for ; Thu, 08 Apr 2021 15:51:53 -0400 Received: by simark.ca (Postfix, from userid 112) id B2A4B1EE0E; Thu, 8 Apr 2021 15:51:53 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F1FC31E590 for ; Thu, 8 Apr 2021 15:51:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 860163955416; Thu, 8 Apr 2021 19:51:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 860163955416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617911512; bh=yAp/Sh1FvWT8cq+FxWjg0U+QzsNaqpyet77E3/2s7w0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wjv+jUAYguewEllg80wbc0f7UNt7aTzQtWroDFTMqd7+c9vBRD1J+NMUTnAECGDoA NZHcwuITu+Vv8TVw30mwEWl67M8k5NUbSlWKD7qa+YATB/h4qRSloxFqb8okm8C4Sh b41FFCsgXL2UNKz4b5KBMwz3tTu0scrglQ0XTIlY= Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by sourceware.org (Postfix) with ESMTPS id BC6BD3955413 for ; Thu, 8 Apr 2021 19:51:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BC6BD3955413 Received: by mail-qk1-x729.google.com with SMTP id z10so3506625qkz.13 for ; Thu, 08 Apr 2021 12:51:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=yAp/Sh1FvWT8cq+FxWjg0U+QzsNaqpyet77E3/2s7w0=; b=cj4xWMpiR3/Tjg8vPGuhqXZYsH38Ldpd67lDCQZshP414yKxC5tZJAGQVtfxEZVa/1 NPVorXFwWe2TqBNC3xlTIjZBHjFGPQLnwWFbAs+rmCmsZWiEHfkXkhYEqI34bxKPwEej bpM5vcefM/CHAS/tkX1w2MKXMBHM2xY6Zlf9dts1wlsrSgCNfrIPE+qGe9ORK+fti+VT kVHnglNSK3yX7amy69B/HMMFLk9rmJLrpIp0Ez0IYeAh11Gd8dm3qirEhg5Yu2iyHJMv yYUJwQH7r/VRQSNtLEbudOJW6dxeQgbStF4LBxDRU0DnytpY7zKnUzTr2ZnYiYm2IHuL D3xg== X-Gm-Message-State: AOAM531a6EloRYboBjLfwGH74mVKo8j0Hpafj07C6kBBASn2c92+UnyI hzZqYaGbhZqtjsASjmb5I4wrZfyUC/yDzQ== X-Google-Smtp-Source: ABdhPJzepXtqY57Qt7tO9S0vr6QTql+va7PhV8hvIFXFgqOcPz2Ojl5IBzvb4mL9L7V90foIZ6ddBw== X-Received: by 2002:a05:620a:1502:: with SMTP id i2mr10504656qkk.373.1617911509351; Thu, 08 Apr 2021 12:51:49 -0700 (PDT) Received: from localhost.localdomain ([2804:7f0:4841:2841:5812:8068:979a:a62c]) by smtp.gmail.com with ESMTPSA id b9sm349187qtx.38.2021.04.08.12.51.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 12:51:49 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [PATCH] [sim,rx] Silence warning that turns into a build error Date: Thu, 8 Apr 2021 16:51:43 -0300 Message-Id: <20210408195143.1349459-1-luis.machado@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On a 32-bit build, I ran into the following: sim/rx/fpu.c:789:6: error: ‘*((void *)&a+8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized] rv = fp_implode (&a); To silence this, just initialize the struct with 0's. sim/rx/ChangeLog: YYYY-MM-DD Luis Machado * fpu.c (rxfp_itof): Initialize structure. --- sim/rx/fpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/rx/fpu.c b/sim/rx/fpu.c index f9e9007192a..9c789e8518c 100644 --- a/sim/rx/fpu.c +++ b/sim/rx/fpu.c @@ -732,7 +732,7 @@ rxfp_itof (long fa, int round_mode) int sign = 0; unsigned int frac_bits; volatile unsigned int whole_bits; - FP_Parts a; + FP_Parts a = {0, 0, 0, 0, 0}; if (fa == 0) return PLUS_ZERO; -- 2.25.1