From nobody Sun Nov 24 08:22:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1726124169; cv=none; d=zohomail.com; s=zohoarc; b=VJSBk378FXj8AiI5bDtptOp4/5kslvVj9h9knXwqGp/7n3AAPEDgV/NsbzRJRxurRpIAFBPirFZGvrbKr1qa0HNwJQiM1tuFP6550NEvKcE9xXDDH7jcNhxcveT8qXSWEoVuK8+NA1/OnvbVXI3HGBIGLkK7v6LYWXNunbM1tVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726124169; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=5FoqK1kIA8mj7Qd/lvT8K/kPhvh2nZqcUgQPUn/2U+o=; b=Jxj6dhL4Mwykxl6+7MDaLlKjzyUEWtKAOlGKe2PBrFBhFaRne0WKduPJYbgtuYUjSPquOcQVIstttKbhAgagVY0c7thUhjWw7ssUItWLY0xxOt6t70jgU2jZro5sv5ZHg8myZrek/tsz4NpGPpQyS8RNhHMJVw9KMQj5uUZWjyc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726124169429851.5355122735109; Wed, 11 Sep 2024 23:56:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sodhs-0008GE-6z; Thu, 12 Sep 2024 02:53:32 -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 1sodhm-0007my-65 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 02:53:28 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sodhk-0003U2-0W for qemu-devel@nongnu.org; Thu, 12 Sep 2024 02:53:25 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5365aec6fc1so649599e87.3 for ; Wed, 11 Sep 2024 23:53:22 -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-42caf016a08sm161947705e9.16.2024.09.11.23.53.19 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Sep 2024 23:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726124001; x=1726728801; 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=5FoqK1kIA8mj7Qd/lvT8K/kPhvh2nZqcUgQPUn/2U+o=; b=XTNUFyTu2lmpzZsAWtv4mo0RQoaEe73o3W79l6tiGW87w4Hyeh2w5Dxh8GaUHpncsr yYRlXQSFFMKlrzZ9Aqwkl7+RyekhMQs13vG8d6BtLLBUrV1rLdm9KmgDob4TdgUohpMZ 5s/hCNRNfW8eyftk2Q8CblTZrRzKW27sASEXZRaDI7z3g6a+mjJcHFDi1cnEi28mdhiV KZSPzyIRynZqX1R6zsqTCCCJs3YmZZqcINXT0kk4TNKka2hhJzSf8VN3Qc8kyRvoxwsa jy7PpFrQjsBwON9QYzrEF08xu9ODcizc5htKwZ4+nXBVNLm59gZi8CJN6W+Fj8Uf/rZt /HUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726124001; x=1726728801; 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=5FoqK1kIA8mj7Qd/lvT8K/kPhvh2nZqcUgQPUn/2U+o=; b=QXukNxIxYcmSk+XrOzuT+TNvdXgpQr+l8QMI5nLzIv5oORJQKyUWctvZHsytZ151vF 54GW3u/wZqV5vsB5xbFhWjxthEvBH4+aNmVXLZTGzwAXjpwkWfWBFN8YNS4KeQZzqC9c CWPGHdmAYU64BjPsWKbxJ2cplU7IMWxIg05ohz6XVOVEUqzuYYUMJoRJ26BrTZqtQ4Om yVmD/Fiklz3QBHyHBq8fiEJA5Or1ko1jvDXJVsWOTAbb4nS0N6ETTfg4mQl1DzBHt1Ng z7ccJBvygkJhB3Wqazt8xv0vCMrPiWqrYpSItVl4AUPriOKllsJseKjJXX6GC1n99NWJ KHFA== X-Gm-Message-State: AOJu0YxX5W3AAUr63Lt2J/1zIKDzgiMmjorxiDM8oQehADgAqdQXw4Kr mHm7VjC9KPOVTA6ET/xxLgkcWGKg9zSKxtRnR6mR59gTQYMa0MgTxGjwnHrAJoLUwdYLsWT5Glt A X-Google-Smtp-Source: AGHT+IGTZz+aE0ePcdX6QJ6/iPOF2WktjT1byifudGhS+2Npuc2quXQnM14oA4oRs2REobN6uHhvDA== X-Received: by 2002:a05:6512:4019:b0:52e:fc7b:39cb with SMTP id 2adb3069b0e04-53678fce759mr917978e87.26.1726124000681; Wed, 11 Sep 2024 23:53:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL v2 54/61] hw/gpio: remove break after g_assert_not_reached() Date: Thu, 12 Sep 2024 08:52:23 +0200 Message-ID: <20240912065227.67848-10-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1726124171098116600 From: Pierrick Bouvier Use of assert(false) can trip spurious control flow warnings from some versions of GCC (i.e. using -fsanitize=3Dthread with gcc-12): error: control reaches end of non-void function [-Werror=3Dreturn-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=C3=A9 Message-ID: <20240910221606.1817478-28-pierrick.bouvier@linaro.org> [PMD: Add description suggested by Eric Blake] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/gpio/nrf51_gpio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/gpio/nrf51_gpio.c b/hw/gpio/nrf51_gpio.c index ffc7dff796..f259be651e 100644 --- a/hw/gpio/nrf51_gpio.c +++ b/hw/gpio/nrf51_gpio.c @@ -40,7 +40,6 @@ static bool is_connected(uint32_t config, uint32_t level) break; default: g_assert_not_reached(); - break; } =20 return state; --=20 2.45.2