From patchwork Thu Sep 12 06:52:21 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: 827785 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1127998wrc; Wed, 11 Sep 2024 23:54:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWNSQrOyFBYD4NGHzBRv1aRZf3ze0JchLdCDmw4kIHoXvEqryygcCB1A3Wi75TmynpVPPsuug==@linaro.org X-Google-Smtp-Source: AGHT+IFffbeZeRIE9yOlCMK+NjwSGWxPepYo5zONKt8F56xHXneufSeL6kQItREj2L0q7BQnVD/Z X-Received: by 2002:ac8:5fc2:0:b0:458:2894:984e with SMTP id d75a77b69052e-458602a7489mr28977271cf.3.1726124086417; Wed, 11 Sep 2024 23:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726124086; cv=none; d=google.com; s=arc-20240605; b=hF+OFHqJT+y98jWejSYO3cezH2sqC0FjOFvCvFroLO7OHMdCpiKqzsIyG7zJ34Ur0G D8jsVbuXcutaGL3+HRPCJhjSMuKJ8hv/n1lx8TteibopKpTLqc8/tRDZNXIO84J2erjA DpYfCfwQr17eHW459jX5MYZc7rpCb+zt9ICU3RgVvCSaupVGKnFuL+m0HmySRI1xc5df l+qzapDRainFJ0HfuZ/KGhwbRTYeRl3PgcLDZADrXGviUWXsOTg4IGligBUe4lPbcvLX 9t2b7vEKL6H46IffxOsa1kgb0S3NZFtUayYbHVfWuSk8XGyNwYgVCpvuGGjHTlvStm4F UAEQ== 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=OsmhMkPXAJPNIk8exjedFxVnBkDRePms2WrWvHvrW1E=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=Az/Y/MfJjgdPMGRWs2xiCqXZyAOwudONuaa7kYNJ05VVgu0iXfuYMRsliRtqK4NUpH rYqR4YbnrQCe47HthqQR/yziOs29V66T44ZTyHDfReWmPZL+6cFih1qHxRdwIleLRq35 lOlHPZJhgokeroo57WSGsjXJP4ft1Z1KNedtStmk0dcJ5LxT9e5Kl8qVUAr/vVN2AzrV UEmylZZ9NLwfMaOGosR08MqwZVtjEFrHEOKszeLQJIY+xv2/TskZfv2YkuTVZEaTF10W Wq7VkNEt0+MqEfnPI7XgirCZSSE18OPhZwsALKnU79+YdU8BG+66tFJtLrg8vpFxc1D3 84Tw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RFlLChLM; 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 d75a77b69052e-45822f81ccesi123777361cf.493.2024.09.11.23.54.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2024 23:54:46 -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=RFlLChLM; 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 1sodhb-0006dH-2B; Thu, 12 Sep 2024 02:53:15 -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 1sodhZ-0006Si-Nf for qemu-devel@nongnu.org; Thu, 12 Sep 2024 02:53:13 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sodhX-0003TO-Rb for qemu-devel@nongnu.org; Thu, 12 Sep 2024 02:53:13 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42cb1e623d1so5433045e9.0 for ; Wed, 11 Sep 2024 23:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726123990; x=1726728790; 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=OsmhMkPXAJPNIk8exjedFxVnBkDRePms2WrWvHvrW1E=; b=RFlLChLM1SqMcMCg/U2GxVSUdkZc8dXMChWZwGxjCBzv3R/VCUJ2ZzEjuNj7NJ8vsf QFtlXjgtBgYeGJSrkwi7XZnUqqCT/9wapL8bddhOqMry2ts/NQKnKVKNfFWXKQzdFiNl PwFTQmss2oaqYxLnKuFdvGMTLjKDe7T0Q3pOpIFmhJrdoXI6OWneIPCT2qJGXoZqwJ0v ciswLyGylaUwoZKS0wQleqMMwG6qgMtygX0/9Y5/fDA9CE6a0vEhZ03nVaXxZFAFqUHq IHnAHGxQSsZRKx3UXdHVFvP3lCTPDp8uxQJWx3AqOOxA1DsVls0a5wzeWGTiXtiLUewf ATgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726123990; x=1726728790; 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=OsmhMkPXAJPNIk8exjedFxVnBkDRePms2WrWvHvrW1E=; b=RdN33qyeVNHdCV38BRwqVL0bEg0OcJlJHiUfNm/NrkWNtEPwtQoNm+zpmR5BKKPSnQ fm/JKJQcUje9OqSuitpxP7xokhDLR58wMvPKxlpX58DFj0QfA3mJR+1SEMdLwQSy3tO0 IUp9TLZNA7WSV4Y9dg/sz+vae3KKGuNMIgMFMWVMx3kXvsActprG9bWvDx9oTjilSeP4 Ag4eTwIJznBUIXx2JuKoIji3CVXHKL4brPaERlEn2BOBR1FZL5yH50YAIJFQo02rsKFF 6CYoKITAtl7u3xcTcf7hkIJQRRdhzClzM6sKzA38LkyZu2lz66zf9U2slNbAeAQlNHWd R08g== X-Gm-Message-State: AOJu0Yyfumc+MN4/6fH8P4dLq5KlmPoLZx2LAyhUDpzHnnq1FGSZ/lVj yWO/7QmHkoVnhn/VrD85iIUovO6WhGvcyFApoeT1G277cU9HPlfbmEBQcg7ZghV7C+L23Fv60tz e X-Received: by 2002:a05:6000:cd2:b0:371:8f32:557e with SMTP id ffacd0b85a97d-378c2d4cab5mr908312f8f.39.1726123989897; Wed, 11 Sep 2024 23:53:09 -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 ffacd0b85a97d-378956654f4sm13450031f8f.43.2024.09.11.23.53.08 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Sep 2024 23:53:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL v2 52/61] hw/core: replace assert(0) with g_assert_not_reached() Date: Thu, 12 Sep 2024 08:52:21 +0200 Message-ID: <20240912065227.67848-8-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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: assert(0); | } | ^ Solve that by 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-6-pierrick.bouvier@linaro.org> [PMD: Add description suggested by Eric Blake] Signed-off-by: Philippe Mathieu-Daudé --- hw/core/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index fb81c1ed51..1b5f44baea 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -380,7 +380,7 @@ void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, } lb_data.data = node->bandwidth; } else { - assert(0); + g_assert_not_reached(); } g_array_append_val(hmat_lb->list, lb_data);