From nobody Thu May 2 03:19:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.218.41 as permitted sender) client-ip=209.85.218.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1611037663; cv=none; d=zohomail.com; s=zohoarc; b=KVj3b5tVIMHlGMsrloWktIqSu/Rl/HicoIXfWSudnLnD42LIqNdXcXp3C+gMzocIxJlvQcLOfImlikZzeqlt9rWXCs4DDBNnh82edN5Ytl4FotgGLGCjOmYYD8inhUVW88wdHKegi6jOvbKYuJp9sj6rT5HC7KYoLhU3IwbuBEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611037663; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=QGEW/zhOCWpBx/ValuvqrDoUReEloE3J1VaEmWJOUPE=; b=dZ559aHXDrrUEclA7GOwyHFTonkYUmO49q/4sjLz41KSpZrApxQ799xmDc2RnwtlV3YdViL8TzgtIvkjMPkyaosQEWPvwMUbj++FwhNVqfmCb8/QGkd/h05h74uV3lMqTzzYvKxKV1deAxvCTGANIo0H213o+jEKACcgGdLoeaE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.218.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mx.zohomail.com with SMTPS id 1611037663271477.12089357180594; Mon, 18 Jan 2021 22:27:43 -0800 (PST) Received: by mail-ej1-f41.google.com with SMTP id g12so26900277ejf.8 for ; Mon, 18 Jan 2021 22:27:42 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id z1sm12374201edm.89.2021.01.18.22.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 22:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QGEW/zhOCWpBx/ValuvqrDoUReEloE3J1VaEmWJOUPE=; b=dUtqZiCpuugJXP+lVz8o5S3DnNQCHOvVd0OE+I6H0e7Qu24JDuw+Qr5EO362RzBBUR ULiNIR7wOPxb3dfceqqL97YDlxaI+V2oFW2qtJvd99TOyAJ+90V20GGt8MD8IPzOt8+t DlLLd54NxP4/kxpYKNWHc5KPZxIgQnWZf3JojQ4Lle9ov05MBucOIYZ6Ou7pzQWEAc1y i+p/JyIa9kCd63QW+CrVDhtkEQkU76Y20isPhcvLN2CwQO8USvP8q7KV7hNHjNcngpEa SNxPz23BAY6z8XBn7HoITGjIgurVa2txPWKxF8BJHASf0VRHwrjwQgpGd/TrUr4qQZic CbnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=QGEW/zhOCWpBx/ValuvqrDoUReEloE3J1VaEmWJOUPE=; b=dsJ1C4JnMdPF7e85sOihxs7FayGSzjbNmZQrawN4GXhT44f+0BInJTVe9vCUOmXBVG b4sziPNUClCCZqBd+RRoiySYlWI2Squ2j50zSGjFFhkg7zkAORP+/oiotc+YFWMqXfdx Vx9t2XpMzh33s9+t4wKbOXqjom34FkPxV6Eo/VcSNVjjTXjn8Nxhm6eGbn2/5H1sp6qa F8AKmVDIBW2vTuXV/0jCmDgtX6phOm0X73OV4z7mV6ENuFV6uhP1uQ1nxcapNWrm06b1 awciHI8Cp3dBhPGgAmvNGFKX66eapIW69wO00NkRYNEQubP1IvWljaxd4u5dTS8c7JoS GKSQ== X-Gm-Message-State: AOAM531x+/PwMPYC4akE5A0fGQ56LhKAgBIvpjmZjqd0B7mZhDNjP/rF sMfxXGBj+Xy7a4nF/Q/3vUU= X-Google-Smtp-Source: ABdhPJxd1EJzrrB+1loKd/kLbqMd14iHb6TEvtBpcmFb7PTCkkPughfkBUxZaCUTc96lMMhOegNOxw== X-Received: by 2002:a17:906:3111:: with SMTP id 17mr1900065ejx.152.1611037661580; Mon, 18 Jan 2021 22:27:41 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] target/arm/m_helper: Silence GCC 10 maybe-uninitialized error Date: Tue, 19 Jan 2021 07:27:39 +0100 Message-Id: <20210119062739.589049-1-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) When building with GCC 10.2 configured with --extra-cflags=3D-Os, we get: target/arm/m_helper.c: In function =E2=80=98arm_v7m_cpu_do_interrupt=E2= =80=99: target/arm/m_helper.c:1811:16: error: =E2=80=98restore_s16_s31=E2=80=99 m= ay be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] 1811 | if (restore_s16_s31) { | ^ target/arm/m_helper.c:1350:10: note: =E2=80=98restore_s16_s31=E2=80=99 wa= s declared here 1350 | bool restore_s16_s31; | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Initialize the 'restore_s16_s31' variable to silence the warning. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/m_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c index 61760030292..731c435c00b 100644 --- a/target/arm/m_helper.c +++ b/target/arm/m_helper.c @@ -1347,7 +1347,7 @@ static void do_v7m_exception_exit(ARMCPU *cpu) bool exc_secure =3D false; bool return_to_secure; bool ftype; - bool restore_s16_s31; + bool restore_s16_s31 =3D false; =20 /* * If we're not in Handler mode then jumps to magic exception-exit --=20 2.26.2