From nobody Mon Apr 29 10:52:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.44 as permitted sender) client-ip=209.85.128.44; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f44.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1610903056; cv=none; d=zohomail.com; s=zohoarc; b=NbrRbp/fGfZA/lvVzJp8cqcu/VisNSAlVgjgmz1LerjNfX/uAxp1CacCnJHpEV3cm6VwlluzSVXzUBbA7HWojAxA8kksogoj+IButglKI0IAX1KEXUsQdc7yhvGyEhN+K5fVQdN1SHgZNt6l0LRVdxCdHVCGD/j0AjPKqA1bnUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610903056; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=Uuhg9E01gIMN6bxPkPWGwBLQ5Y4pX/rH09FJ5cXM4eg=; b=aIyS1L7j2bFqQC0J3uialR8UDzzS6Q7n22D8FjSAZpjHUtH4e/Vp7Ust+GjeV2R45rBKsgP8vfbg5tkF1/XTzvPv6jXW+26P+c9gIGnQfoBndA8jc6lNXYCzsmgHuJu1VsNhJ1SrhNVF72fAWSllLxyroop1wzUJuku86pQ5al4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.zohomail.com with SMTPS id 1610903056061213.24682332025884; Sun, 17 Jan 2021 09:04:16 -0800 (PST) Received: by mail-wm1-f44.google.com with SMTP id o10so4738024wmc.1 for ; Sun, 17 Jan 2021 09:04:15 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id v20sm26342639wra.19.2021.01.17.09.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 09:04:13 -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=Uuhg9E01gIMN6bxPkPWGwBLQ5Y4pX/rH09FJ5cXM4eg=; b=fv9NEdiVgZ10QSTl0hVJjuNZYRukbZwkCmwg3kY/5hwozedB+THQt6wjo3RWR3Dc+T XmJl9mmrvM0yjt8Yx8nkaFCtVE0olYMF6DNYJ/4boqr0+/gr1DYgKH4QwJfGxHHa8ewN S/TDg21HiWPewIzvjCLIIeSbEFNZrEWRU6IFo5dDo2lJ9dyMOXrjvrYZAzD+Kp8+e/JE hPEWBsomBx3JnEYrHlToJbBBkO9g9n++M3vo5Zq+Ohzad7PNChz0f+tKcZH5UQWl/UNG XLnkbZOc2FX0tb75hP2Ea/on3RxuTAtIqQzhBMUcRRispqiu7IoIhckd1wenmnamUHEi jkBA== 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=Uuhg9E01gIMN6bxPkPWGwBLQ5Y4pX/rH09FJ5cXM4eg=; b=C9nv1kLZQWFVCNWmkp2EYC6EOhg7lG1gPAiCVVpH3NpQzKt0AmG00f9Sr0MuUyAIys A1IIiJ7mtUclCn/PxRxCf2wgEk/b+9JNwt8Ms6u0LgqAxP3lINS7uy0FmFC4usxBL+On xuE3NpK4VlxoVy2WRRmNQsqmdFldYYqO4zJEwn2fdmfXrP1Xr69LiwYoKD+ko8TYyGQk qdQ/kQ+uhl18oyC/X35C8HHTUuRALHhYSqig/KrU5FvP7L+7mqH7OBis2Dz5+f56bl7b Sx0sg2JLQfGAhT9BIeq4fdan5bag9nHRHLfsxra7WXLsihRn/DmyGq46Oo4nunHIE8Pr b2Yg== X-Gm-Message-State: AOAM530jcdF/zkOcAv0QwwikjS58vNxylKK5AhCNC90n1E90d7hi6tbd Z4+BGJPkKe1dZt3CAjXeK1o= X-Google-Smtp-Source: ABdhPJwz9Gi6LDlBnfFGk1aKKWiM4cBb4H3TtJ5IITkIiAdFxyjnSmQ5eelXnbBChPdFA6qfqXFG8g== X-Received: by 2002:a1c:e90b:: with SMTP id q11mr17605631wmc.102.1610903054288; Sun, 17 Jan 2021 09:04:14 -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: Thomas Huth , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2] softmmu/physmem: Silence GCC 10 maybe-uninitialized error Date: Sun, 17 Jan 2021 18:04:11 +0100 Message-Id: <20210117170411.4106949-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: softmmu/physmem.c: In function =E2=80=98address_space_translate_for_iotlb= =E2=80=99: softmmu/physmem.c:643:26: error: =E2=80=98notifier=E2=80=99 may be used u= ninitialized in this function [-Werror=3Dmaybe-uninitialized] 643 | notifier->active =3D true; | ^ softmmu/physmem.c:608:23: note: =E2=80=98notifier=E2=80=99 was declared h= ere 608 | TCGIOMMUNotifier *notifier; | ^~~~~~~~ Initialize 'notifier' to silence the warning. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- v2: Remove pointless assert (Peter Maydell) Yet another hole in our CI. Supersedes: <20210117160754.4086411-1-f4bug@amsat.org> --- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 6301f4f0a5c..cdcd197656f 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -605,7 +605,7 @@ static void tcg_register_iommu_notifier(CPUState *cpu, * when the IOMMU tells us the mappings we've cached have changed. */ MemoryRegion *mr =3D MEMORY_REGION(iommu_mr); - TCGIOMMUNotifier *notifier; + TCGIOMMUNotifier *notifier =3D NULL; int i; =20 for (i =3D 0; i < cpu->iommu_notifiers->len; i++) { --=20 2.26.2