From patchwork Thu Sep 12 06:52:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 827782 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1127772wrc; Wed, 11 Sep 2024 23:53:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWdv1UAxEYJZpoX+28lh2ViEsYtt5YErTww0fYMBLZOu4bLx6fvvXiGlW8T5ipVgAFxI2Qy4A==@linaro.org X-Google-Smtp-Source: AGHT+IH8ZVJPWJsxtUycRiugF4jjWujBuMHfT4tLJfGXA21NkOZv3dWhkOJFHhNunBoXMhgH0epN X-Received: by 2002:a05:620a:2910:b0:7a9:9ed7:b49f with SMTP id af79cd13be357-7a9e5f3f454mr220506885a.38.1726124023343; Wed, 11 Sep 2024 23:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726124023; cv=none; d=google.com; s=arc-20240605; b=Oy0VwO4cZZcg2g0VSh5XL4nqxPqgSzE3r1cB7++/yylECFUywxkGgK5vGN0daHrelI AhCH7GshVI5kP/VqNYRFw2uO2PGEUGXAj+u/QEUkPbx1iztF53EA57amKPjsGmjqh0Xd P/gG0191bymkjZC3hDOM9wkydb8nDqAkT7KVQPKn26bd/zB/2YSGZDaWtCTWnAguZnth yYQfJgjumbub36YnqukzbcjMc+czQCXu/603jm0nW2p5sfjeDJ2jZPkqwNlsp1kWpQwk zEd4GpsQc+FbDiEloS0t0HXPiw+qzSarSDXVtbieN1Wtzps2+vcIz8BJ+gkBkjN3iJrs a/eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=DoSSTd0j6/NNSb1Pb5Q11FBgrZrs0Txd/Ud1jRinqIs=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=UhVFc7FIYNgfSLR7wLTYaPDHlC+hIjTtBHP12k4/lLfOsHqzxGC/Wkctgnrvq/7zSW pPukiZN0WlzqC1QwdR2TkT/3kDDko8b/8ma93MycOqIaWe/s8Zv9eZFgl9xqoGr4VLDx ZCiuTESBRL6VSnFNLaOzGO37etDRntizl6IVnPIHC0hN11xBbNZc7LGE2KZfrfkGh59C I48ZUf46/ko3qlHO/K40jJDnvj8zzwchNH+HrG/y9FbK58TZGyLCUOIGhHJUIvg+/7Qv ZBLZ3/wEfox9Q6xMz4NephphiR3AMrgI6eheCkJM3q7PZrNRvNrbozp+OSqXfYiq4P1G 3Ktw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eR8C5yd9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a9a79c5246si1199614585a.8.2024.09.11.23.53.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2024 23:53:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eR8C5yd9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sodhx-0000Os-HN; Thu, 12 Sep 2024 02:53:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sodhw-0000Cy-1L for qemu-devel@nongnu.org; Thu, 12 Sep 2024 02:53:36 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sodht-0003VJ-S9 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 02:53:35 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-371ba7e46easo518935f8f.0 for ; Wed, 11 Sep 2024 23:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726124012; x=1726728812; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DoSSTd0j6/NNSb1Pb5Q11FBgrZrs0Txd/Ud1jRinqIs=; b=eR8C5yd9t7UnYUYFHfjrJ8HwhqkeZmgJ2EmhX1KKO+KRzNqdqHHXYblrKXZohR6W2x Ne8pGo83IhLWlNJBNa2gd76Q1iAq5+w8cRAdvZu4t3zDoTHCmA9afoO8jmsJAU++Q/2O BUdluaBeQ96RAkGoJDN6gl83NASqmJGqqZ8iq0QmWyOCzFDEuykWziHFFHi6iGUVmwqT 2KloM/M8GXJuINFYraLa6Xg0Bsp4YW8pltF+8rNP0+yPOoA7jLEHjnlnVr+CB4sFNpXb QUMYtvbg1gBTuJTUZcREXMi6c/KCdBigEoDcWHd0YWVrVPP1jWb5isQZfL7ZU4NwhKAN 7o1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726124012; x=1726728812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DoSSTd0j6/NNSb1Pb5Q11FBgrZrs0Txd/Ud1jRinqIs=; b=a9CmDmuH6GgfHOY+/noe9sq1kmkVx26ONZQMDQMRq6iPKkPFelkWRMI4304MLfESEM 6EyTR3cScFdTn5TEQbvAzngEqHJhylsfK6Q/iEtrdO2OKRSul0leEgGe0os2N4Tf7zyV CVfP/OL91kqUThwpMOZjeNd65qxm7E5hC2xw4zfzFK0sEtJpo7OWVnlb5vmGRy3aOFmv edu8ghasEnGHiHcWr/VTJ3dA9smVcK07BKudl3E/I5ZRcMUAP7YbhbJcoCLVmOngIpmO rGcfMBqFXQG5qAiLaQ7EeZrps/Koe5dnEYZi6Ep7FKCaLZN1t65AvIiGQoSnU0TnYhoB XRAg== X-Gm-Message-State: AOJu0Yx/hPk3Wv0f8e8l3teSSgvL98faJJlMjHCkEHM1kcixVToavwVY W6kdWJ6KghJvA6Wwo91no6Nud9Uzdjd5wq6thl2XfoCKXZj13SNk8hmWIIx5/VwCp5CWS4PIGi8 c X-Received: by 2002:a05:6000:2a8:b0:368:37ac:3f95 with SMTP id ffacd0b85a97d-378c2d032ebmr1378015f8f.31.1726124011715; Wed, 11 Sep 2024 23:53:31 -0700 (PDT) Received: from m1x-phil.lan (mic92-h03-176-184-33-210.dsl.sta.abo.bbox.fr. [176.184.33.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42caeb44473sm162061135e9.26.2024.09.11.23.53.30 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Sep 2024 23:53:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL v2 56/61] hw/pci-host: remove break after g_assert_not_reached() Date: Thu, 12 Sep 2024 08:52:25 +0200 Message-ID: <20240912065227.67848-12-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240912065227.67848-1-philmd@linaro.org> References: <20240912065227.67848-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Use of assert(false) can trip spurious control flow warnings from some versions of GCC (i.e. using -fsanitize=thread with gcc-12): error: control reaches end of non-void function [-Werror=return-type] default: g_assert_not_reached(); break; | ^^^^^ Solve that by removing the unreachable 'break' statement, unifying the code base on g_assert_not_reached() instead. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240910221606.1817478-31-pierrick.bouvier@linaro.org> [PMD: Add description suggested by Eric Blake] Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/gt64120.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/pci-host/gt64120.c b/hw/pci-host/gt64120.c index 33607dfbec..5855741662 100644 --- a/hw/pci-host/gt64120.c +++ b/hw/pci-host/gt64120.c @@ -689,7 +689,6 @@ static void gt64120_writel(void *opaque, hwaddr addr, case GT_PCI0_CFGDATA: /* Mapped via in gt64120_pci_mapping() */ g_assert_not_reached(); - break; /* Interrupts */ case GT_INTRCAUSE: @@ -933,7 +932,6 @@ static uint64_t gt64120_readl(void *opaque, case GT_PCI0_CFGDATA: /* Mapped via in gt64120_pci_mapping() */ g_assert_not_reached(); - break; case GT_PCI0_CMD: case GT_PCI0_TOR: