From nobody Fri May 3 09:14:07 2024 Delivered-To: importer@patchew.org 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; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576604193; cv=none; d=zohomail.com; s=zohoarc; b=NDXSsCRGiY9UpKXSE1yOCfXL6j33zfA4Zhz576NkP9kUxfYQsNDzp2D57No/iEykZlzHkxCkosrUwMCWD66GJtcD2Ig9wq/zFQib57ZSFPxEAvXfiiG4VqrGoO53G2WTCqiNyNkim9bobyIZETC0qqVje/zwBR63oihNk94Z9d0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576604193; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=i/ycAlXiPXADaLAOWo3IoxfdaOKQ4Pec1+OI0orkZ5c=; b=kE5Oxe3vAwfwkpeHVINAZ3vn/O8Kmvan2+SUJK6/jzeSU6GJujEpomDqTaeED6zDaGtqWQCTgDqOInM15D4h4aVSJ5qXdVgS4DsuDjr3rd6yxuBQ5wSV3mCr8jasp2pwCj5VS7onnWW8xco8uq/C5vLPbMB9bXJP5qfk2FVpYX8= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576604193774842.8657176444028; Tue, 17 Dec 2019 09:36:33 -0800 (PST) Received: from localhost ([::1]:44220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGls-0003XK-8u for importer@patchew.org; Tue, 17 Dec 2019 12:36:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46076) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGkK-0001WZ-4y for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGkI-0008Ak-7c for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:34:56 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:44920 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihGkI-0008A4-3q for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:34:54 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-Fz3Ue5MAMvqsmOjIRlB__g-1; Tue, 17 Dec 2019 12:34:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6373C8024E6; Tue, 17 Dec 2019 17:34:49 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB5EA19C4F; Tue, 17 Dec 2019 17:34:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576604093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i/ycAlXiPXADaLAOWo3IoxfdaOKQ4Pec1+OI0orkZ5c=; b=OreWebw9FkyVlzJmb01uipl/8WCSkZ6mmGvWsLzxBl5g4oJL22btiH/vMY30ER06MnGujs ZPs5KJXWgsnMgSy0B9aSxipSB4VUkjd1VsJjo8omXmdHF520vOn7kx3PPhHij/ZQpYTxmH wzQj2JsDRmK1QT8M/z0xswNliJiniYo= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/6] audio/audio: Add missing fall through comment Date: Tue, 17 Dec 2019 18:34:20 +0100 Message-Id: <20191217173425.5082-2-philmd@redhat.com> In-Reply-To: <20191217173425.5082-1-philmd@redhat.com> References: <20191217173425.5082-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Fz3Ue5MAMvqsmOjIRlB__g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=3D2: audio/audio.c: In function =E2=80=98audio_pcm_init_info=E2=80=99: audio/audio.c:306:14: error: this statement may fall through [-Werror=3Di= mplicit-fallthrough=3D] 306 | sign =3D 1; | ~~~~~^~~ audio/audio.c:307:5: note: here 307 | case AUDIO_FORMAT_U8: | ^~~~ cc1: all warnings being treated as errors Add the missing fall through comment, similarly to e46349414. Fixes: 2b9cce8c8c Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- Cc: Gerd Hoffmann Cc: "K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n" --- audio/audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/audio.c b/audio/audio.c index 56fae55047..57daf3f620 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -304,6 +304,7 @@ void audio_pcm_init_info (struct audio_pcm_info *info, = struct audsettings *as) switch (as->fmt) { case AUDIO_FORMAT_S8: sign =3D 1; + /* fall through */ case AUDIO_FORMAT_U8: mul =3D 1; break; --=20 2.21.0 From nobody Fri May 3 09:14:07 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576604320; cv=none; d=zohomail.com; s=zohoarc; b=BySnlJ8cJRUw1AS5v+cWZxBzC5KFspoxri52uiQ8A62az73DKf6laPMHT9y5+o8SkdLd5HOmbszW+6VmJry/PB8oNXb2r8uivm0JJJYp+gaW7R+PdKcl6holpHKD0jsRj+K5goJvhu3bh2dQKUc8UNPNDOC6qFoCOvBjCRcCd1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576604320; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=024EQHq67Rd7USQOwAS6CFKa3pM0k1rzZuTHwHmHWb8=; b=oEAWO/De8ei07NMfP3LnZPok4If1bKOWYMF1RHnUv3HHlO32QMhF9yk+c/Ct3K98MWrRp7mwq4GwLgfevR8pI8K/jnGNhov4VQ2hiltKO3ZTG/jYGDt32iZ0QNnxHsym8ijufkj045u8x2kA1OE0uxLb14XfRhm24vh16HnE2Jw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576604320084238.01536209108713; Tue, 17 Dec 2019 09:38:40 -0800 (PST) Received: from localhost ([::1]:44256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGnu-0007Lx-LV for importer@patchew.org; Tue, 17 Dec 2019 12:38:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46142) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGkM-0001ba-U0 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:34:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGkL-0008JF-S7 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:34:58 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:30818 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihGkL-0008IM-P6 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:34:57 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-Q2qQ9ZUJNjKv8sUJ0YPWfA-1; Tue, 17 Dec 2019 12:34:54 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AB0F18024E9; Tue, 17 Dec 2019 17:34:52 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00CC719C4F; Tue, 17 Dec 2019 17:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576604097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=024EQHq67Rd7USQOwAS6CFKa3pM0k1rzZuTHwHmHWb8=; b=KZcC1NSSloQAUp0xqaZjKc3mcVbWo6GgMpvUpFI73pPyjSEodvPA7prU5Lcpqod02Lyxwm pF2mMUejYkpWU/k8rg/MlhSp5TBnafpq77Ko1gk+10EFbKn8sNJdEA8pitibUG4Xp2sfNg geq8Vp+L95KPL0AWMebKBkDWG2ZUQ2Q= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/6] hw/display/tcx: Add missing fall through comments Date: Tue, 17 Dec 2019 18:34:21 +0100 Message-Id: <20191217173425.5082-3-philmd@redhat.com> In-Reply-To: <20191217173425.5082-1-philmd@redhat.com> References: <20191217173425.5082-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Q2qQ9ZUJNjKv8sUJ0YPWfA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Olivier Danet Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=3D2: hw/display/tcx.c: In function =E2=80=98tcx_dac_writel=E2=80=99: hw/display/tcx.c:453:26: error: this statement may fall through [-Werror= =3Dimplicit-fallthrough=3D] 453 | s->dac_index =3D (s->dac_index + 1) & 0xff; /* Index = autoincrement */ | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/display/tcx.c:454:9: note: here 454 | default: | ^~~~~~~ hw/display/tcx.c: In function =E2=80=98tcx_dac_readl=E2=80=99: hw/display/tcx.c:412:22: error: this statement may fall through [-Werror= =3Dimplicit-fallthrough=3D] 412 | s->dac_index =3D (s->dac_index + 1) & 0xff; /* Index auto= increment */ | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/display/tcx.c:413:5: note: here 413 | default: | ^~~~~~~ cc1: all warnings being treated as errors Add the missing fall through comments. Fixes: 55d7bfe22 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- Cc: Olivier Danet Cc: Mark Cave-Ayland --- hw/display/tcx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index 14e829d3fa..abbeb30284 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -410,6 +410,7 @@ static uint64_t tcx_dac_readl(void *opaque, hwaddr addr, case 2: val =3D s->b[s->dac_index] << 24; s->dac_index =3D (s->dac_index + 1) & 0xff; /* Index autoincrement= */ + /* fall through */ default: s->dac_state =3D 0; break; @@ -451,6 +452,7 @@ static void tcx_dac_writel(void *opaque, hwaddr addr, u= int64_t val, s->b[index] =3D val >> 24; update_palette_entries(s, index, index + 1); s->dac_index =3D (s->dac_index + 1) & 0xff; /* Index autoincre= ment */ + /* fall through */ default: s->dac_state =3D 0; break; --=20 2.21.0 From nobody Fri May 3 09:14:07 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576604200; cv=none; d=zohomail.com; s=zohoarc; b=LngC3cUpugNoF/NQpeMclpcg8vsBMLMRZxIXFqHtyOgIffEeylnqsVLkQooIqhmabDAmIABxod9GZTBfiC+plu0OeWylTR5FmL3XrNFu5GtdsE0zmqFhRfVqQPchIwO3H75tcLYBNU5+5E/GyyBEsFWSR+PYdOzZWzt5ofN0q5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576604200; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JerXtiZg/NdV0y3V9bJw7XC5WMrWi8gnxmPCM/s6nsY=; b=SEyqhsLJE0FCMQ16aSINH4NO0hpsUmZ/f08W0MuWtZJtJM+ehdXbgpDtLgEIY1f+X2cKVYpmPNXftpVIqLyuTBI/Tcr1bnenS9/ArhzAUmtfQUPhJJ3lyklmn3zZw070AvJRBI7hchO5R1wButujC/x5QcLDHDgYDKbt9yTFZTE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576604200324732.7676679217097; Tue, 17 Dec 2019 09:36:40 -0800 (PST) Received: from localhost ([::1]:44224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGly-0003jY-Oo for importer@patchew.org; Tue, 17 Dec 2019 12:36:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46237) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGkT-0001oH-31 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGkR-00009j-W6 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:04 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:50902 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihGkR-000092-Sg for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:03 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-uWLPNUfoMs6bVftKDHCoMw-1; Tue, 17 Dec 2019 12:35:00 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9DAA18C35C0; Tue, 17 Dec 2019 17:34:58 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7616D19C4F; Tue, 17 Dec 2019 17:34:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576604103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JerXtiZg/NdV0y3V9bJw7XC5WMrWi8gnxmPCM/s6nsY=; b=Xz7V6hYQAKWAaICBYEXW/vJfU4bVXDjtJ9PCOmi7rB3ypcXNDd1U80vcFZFI4Zz2dnKAP0 ILftMqHCsFYlV0EsE6v/HzUnGNRhDm96m14eTCNH/UDNC9Ybqp51tBDxq9tMNFfYNKfFmF 7Z42KuzqPxIGIuT3sIaX9ONC/8P2vqE= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments Date: Tue, 17 Dec 2019 18:34:22 +0100 Message-Id: <20191217173425.5082-4-philmd@redhat.com> In-Reply-To: <20191217173425.5082-1-philmd@redhat.com> References: <20191217173425.5082-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: uWLPNUfoMs6bVftKDHCoMw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-trivial@nongnu.org, Jason Wang , qemu-arm@nongnu.org, Peter Chubb , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=3D2: hw/net/imx_fec.c: In function =E2=80=98imx_eth_write=E2=80=99: hw/net/imx_fec.c:906:12: error: this statement may fall through [-Werror= =3Dimplicit-fallthrough=3D] 906 | if (unlikely(single_tx_ring)) { | ^ hw/net/imx_fec.c:912:5: note: here 912 | case ENET_TDAR: /* FALLTHROUGH */ | ^~~~ cc1: all warnings being treated as errors Rewrite the comments in the correct place, using 'fall through' which is recognized by GCC and static analyzers. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Aleksandar Markovic Reviewed-by: Richard Henderson --- Cc: Peter Chubb Cc: Peter Maydell Cc: Jason Wang Cc: qemu-arm@nongnu.org --- hw/net/imx_fec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index bd99236864..30cc07753d 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -901,15 +901,17 @@ static void imx_eth_write(void *opaque, hwaddr offset= , uint64_t value, s->regs[index] =3D 0; } break; - case ENET_TDAR1: /* FALLTHROUGH */ - case ENET_TDAR2: /* FALLTHROUGH */ + /* fall through */ + case ENET_TDAR1: + case ENET_TDAR2: if (unlikely(single_tx_ring)) { qemu_log_mask(LOG_GUEST_ERROR, "[%s]%s: trying to access TDAR2 or TDAR1\n", TYPE_IMX_FEC, __func__); return; } - case ENET_TDAR: /* FALLTHROUGH */ + /* fall through */ + case ENET_TDAR: if (s->regs[ENET_ECR] & ENET_ECR_ETHEREN) { s->regs[index] =3D ENET_TDAR_TDAR; imx_eth_do_tx(s, index); --=20 2.21.0 From nobody Fri May 3 09:14:07 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576604326; cv=none; d=zohomail.com; s=zohoarc; b=Dp5bFrfDlOmWPx/MT+kNXD2MGLLBxtFKuFp5+wEQRbgjhp4ZtjwYoEYYee+6OUrBoZ+s7DXvW7GxJ981KfaN1CVuGUgd8yarsoW+5E7iOxbuNoVCXjPdww8b+tczwI8gj+YhcRkBTHnF0sc2HB6qLMJcvZ2tuiE3PPrrxL8Y1zU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576604326; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HM0BAidIfenT9MqU4w2ULCCF6forF8fZZ3ED/PgaTLg=; b=fkB857a33KT3eZgbrnP+jTOzUgb0Duky35jsc95nH2CkduelLpWvwoWewfYJl+GMxEubvgrqAZZWOM8Jvdo2HkVZp8P7k/4kBJy3gzKq3j+bpRhIbb0yi5Lxt359rgzeThRWA05hti8REwTyJ+9FkQFa8zfAoxHyPe2S3IV50wY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576604326197437.79086790121187; Tue, 17 Dec 2019 09:38:46 -0800 (PST) Received: from localhost ([::1]:44258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGo0-0007bj-Rs for importer@patchew.org; Tue, 17 Dec 2019 12:38:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46323) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGkX-0001va-GB for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGkW-0000Nj-AW for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:09 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:28117 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihGkW-0000MN-6c for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:08 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-209-o2RGE3-LP9WZo3T31gvbNw-1; Tue, 17 Dec 2019 12:35:04 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 845A7100728C; Tue, 17 Dec 2019 17:35:02 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8095E26571; Tue, 17 Dec 2019 17:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576604107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HM0BAidIfenT9MqU4w2ULCCF6forF8fZZ3ED/PgaTLg=; b=HKuB69O5j1hvhslsC7mhmX8Ai9v2sUGbH1S1ViCLDv1Jab4hFGyQ6+9D1ILJ4RTt4iLtUI fP1D1paUsTEcK7Sh1conbD1MYcRR7+tc5IafB7FvYe3sKh6UHAR0AYIAdUFnRBCCS+40Bf pdASUo0e21jjjwV7oeDQCMWUdSPcZyw= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment Date: Tue, 17 Dec 2019 18:34:23 +0100 Message-Id: <20191217173425.5082-5-philmd@redhat.com> In-Reply-To: <20191217173425.5082-1-philmd@redhat.com> References: <20191217173425.5082-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: o2RGE3-LP9WZo3T31gvbNw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-trivial@nongnu.org, Andrew Jeffery , qemu-arm@nongnu.org, Joel Stanley , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=3D2: hw/timer/aspeed_timer.c: In function =E2=80=98aspeed_timer_set_value=E2= =80=99: hw/timer/aspeed_timer.c:283:24: error: this statement may fall through [-= Werror=3Dimplicit-fallthrough=3D] 283 | if (old_reload || !t->reload) { | ~~~~~~~~~~~^~~~~~~~~~~~~ hw/timer/aspeed_timer.c:287:5: note: here 287 | case TIMER_REG_STATUS: | ^~~~ cc1: all warnings being treated as errors Add the missing fall through comment. Fixes: 1403f364472 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Aleksandar Markovic Reviewed-by: C=C3=A9dric Le Goater --- Cc: "C=C3=A9dric Le Goater" Cc: Peter Maydell Cc: Andrew Jeffery Cc: Joel Stanley Cc: qemu-arm@nongnu.org --- hw/timer/aspeed_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c index a8c38cc118..c91f18415c 100644 --- a/hw/timer/aspeed_timer.c +++ b/hw/timer/aspeed_timer.c @@ -283,7 +283,7 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState= *s, int timer, int reg, if (old_reload || !t->reload) { break; } - + /* fall through to re-enable */ case TIMER_REG_STATUS: if (timer_enabled(t)) { uint64_t now =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); --=20 2.21.0 From nobody Fri May 3 09:14:07 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576604461; cv=none; d=zohomail.com; s=zohoarc; b=Tm6Nuzh8RNFdSPzK6CBmOykAFcTGHXi+1E6g8wrOD/LOi5NTl9h4UwtvHDdc/Sd9c4QBr8t2XELL4I77Wm7YczKWIoLqBnf886ODT864CBaNc+HOHD+EUIFAFPJqfvzasc1hBDqYeQfary2i8RCC5AmKQv3drJEmWyZTh2zc744= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576604461; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KcgxP654q8JrZZKpweOj7VL388Y+101SMguXVusGbCk=; b=ZE7bl3GKeaHFXPBJzkhNkzUqnzzeKe5B/lkPr1gQd2sUEZkDAD+tVdrnT1PirPVMZQLVv+Y3lfjRxAl8vVqx9Yknk0HrF8x6l9kfLsK2ge7tu8LVrnY9uiH1FTJFAIg/Yn2JfRJtPT2gpm82V4SxJXR7bpbBrpyBMAN6NTnqCGI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576604461436336.1044700216544; Tue, 17 Dec 2019 09:41:01 -0800 (PST) Received: from localhost ([::1]:44358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGqB-0002Ou-Ib for importer@patchew.org; Tue, 17 Dec 2019 12:40:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46390) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGka-00020T-Lc for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGkZ-0000V4-F0 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:12 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:53084 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihGkZ-0000TX-Aj for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:11 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-sLW230SQNdO0XWtKNxKGtw-1; Tue, 17 Dec 2019 12:35:07 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6B36E800D24; Tue, 17 Dec 2019 17:35:06 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C65019C4F; Tue, 17 Dec 2019 17:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576604111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KcgxP654q8JrZZKpweOj7VL388Y+101SMguXVusGbCk=; b=IZQdnvd4colSmvGNJqO5kW7+t9pfo7n5bnbyH5PHf7pgIBmM7DJc1ConE0ErRgppW4ml7u 2aKoSFlbOsdNKNt9kGJEFL6MldTBQYzSQ9t24/CSQhN8MiWQ+xT4Uf1XvUtFkaWz3OKuoC JH20Kajx+vfWxVize08To6SV1B3p3Gc= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/6] hw/scsi/megasas: Silent GCC9 duplicated-cond warning Date: Tue, 17 Dec 2019 18:34:24 +0100 Message-Id: <20191217173425.5082-6-philmd@redhat.com> In-Reply-To: <20191217173425.5082-1-philmd@redhat.com> References: <20191217173425.5082-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: sLW230SQNdO0XWtKNxKGtw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Hannes Reinecke , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" GCC9 is confused when building with CFLAG -O3: hw/scsi/megasas.c: In function =E2=80=98megasas_scsi_realize=E2=80=99: hw/scsi/megasas.c:2387:26: error: duplicated =E2=80=98if=E2=80=99 conditi= on [-Werror=3Dduplicated-cond] 2387 | } else if (s->fw_sge >=3D 128 - MFI_PASS_FRAME_SIZE) { hw/scsi/megasas.c:2385:19: note: previously used here 2385 | if (s->fw_sge >=3D MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE) { cc1: all warnings being treated as errors When this device was introduced in commit e8f943c3bcc, the author cared about modularity, using a definition for the firmware limit. If we modify the limit, the code is valid. Add a check if the definition got modified to a bigger limit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Cc: Hannes Reinecke Cc: Paolo Bonzini Cc: Fam Zheng Cc: qemu-block@nongnu.org --- hw/scsi/megasas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index de9bd20887..ece1601b66 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2382,7 +2382,8 @@ static void megasas_scsi_realize(PCIDevice *dev, Erro= r **errp) if (!s->hba_serial) { s->hba_serial =3D g_strdup(MEGASAS_HBA_SERIAL); } - if (s->fw_sge >=3D MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE) { + if (MEGASAS_MAX_SGE > 128 + && s->fw_sge >=3D MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE) { s->fw_sge =3D MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE; } else if (s->fw_sge >=3D 128 - MFI_PASS_FRAME_SIZE) { s->fw_sge =3D 128 - MFI_PASS_FRAME_SIZE; --=20 2.21.0 From nobody Fri May 3 09:14:07 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576604209; cv=none; d=zohomail.com; s=zohoarc; b=Mzd5Rat5KJfeilhT4KzDD8Qm3aYeubsjNpKckYO1EYG8UHzvk2t1ayK9NQ0GuAJqIa+ab22TP4UXUXtAPK2/VWkd1ZvBh6xfqcR9Kt76NKE/07p6NwHjz1zDKXMXXwHQUnmQm7+XCJrpuPhxyHudSQvfV+U6rLLX6dkKr7a0lDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576604209; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y+5GQW/D3XfrNd11HlFzSAvLO+49VFKNR/eOAZ5FZJk=; b=UxCrAz6sV9mfvA4iJ4KrQqkjVgct+qaWqRCKcKVH6Ih83QeI0bRV35kq/F92SwMcFi9E3YUCKBIZW4y1moZRf6nFGSaNKmIbwve4/7f4pFdc1vJ+rUg+bthmhRUpF6iiNEE6Dnx+l3evx5GcODYh7lAq92Gb5G2/b+FeUEBXajU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576604209416289.5031926005656; Tue, 17 Dec 2019 09:36:49 -0800 (PST) Received: from localhost ([::1]:44226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGm7-0003yP-Sn for importer@patchew.org; Tue, 17 Dec 2019 12:36:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46475) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGke-00026V-7i for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGkd-0000eG-4T for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:16 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:33030 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihGkd-0000dZ-0L for qemu-devel@nongnu.org; Tue, 17 Dec 2019 12:35:15 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-342-0nPwLdugM5mNllHWznEZyw-1; Tue, 17 Dec 2019 12:35:11 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 49E4EDBFB; Tue, 17 Dec 2019 17:35:10 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3150826571; Tue, 17 Dec 2019 17:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576604114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y+5GQW/D3XfrNd11HlFzSAvLO+49VFKNR/eOAZ5FZJk=; b=FEUwkMhkciZN3cnRaTxCyJuioITSPNN9xRlpk7BcXFop+jpm6mBjdpArLHXR3Un6pR1ZGu d07BjZ7+Z7smQkEtRtRb4CQ/LRfGJ9NXG/ROABffX3IhWe2EI8qjCQd0kO7D2SqVVXfaKs Ze2evdJrbPf/QKiiWHllzQ6Qz7fEqSw= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 6/6] qemu-io-cmds: Silent GCC9 format-overflow warning Date: Tue, 17 Dec 2019 18:34:25 +0100 Message-Id: <20191217173425.5082-7-philmd@redhat.com> In-Reply-To: <20191217173425.5082-1-philmd@redhat.com> References: <20191217173425.5082-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 0nPwLdugM5mNllHWznEZyw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" GCC9 is confused when building with CFLAG -O3: In function =E2=80=98help_oneline=E2=80=99, inlined from =E2=80=98help_all=E2=80=99 at qemu-io-cmds.c:2414:9, inlined from =E2=80=98help_f=E2=80=99 at qemu-io-cmds.c:2424:9: qemu-io-cmds.c:2389:9: error: =E2=80=98%s=E2=80=99 directive argument is = null [-Werror=3Dformat-overflow=3D] 2389 | printf("%s ", ct->name); | ^~~~~~~~~~~~~~~~~~~~~~~ Audit shows this can't happen. Give a hint to GCC adding an assert() call. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org --- qemu-io-cmds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 1b7e700020..9e956a5dd4 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -2411,6 +2411,7 @@ static void help_all(void) const cmdinfo_t *ct; =20 for (ct =3D cmdtab; ct < &cmdtab[ncmds]; ct++) { + assert(ct->name); help_oneline(ct->name, ct); } printf("\nUse 'help commandname' for extended help.\n"); --=20 2.21.0