From patchwork Wed Aug 21 11:19:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1150793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46D5Lx0ttcz9sBF for ; Wed, 21 Aug 2019 21:40:25 +1000 (AEST) Received: from localhost ([::1]:47253 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0OyV-0001q0-1G for incoming@patchwork.ozlabs.org; Wed, 21 Aug 2019 07:40:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53857) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0Ofg-0005W6-JB for qemu-devel@nongnu.org; Wed, 21 Aug 2019 07:21:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0OfZ-0006ky-Hh for qemu-devel@nongnu.org; Wed, 21 Aug 2019 07:20:56 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:42937) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0OfZ-0006kA-8O; Wed, 21 Aug 2019 07:20:49 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N0F9t-1iD08N1wCF-00xHPp; Wed, 21 Aug 2019 13:20:08 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 21 Aug 2019 13:19:42 +0200 Message-Id: <20190821111947.26580-10-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190821111947.26580-1-laurent@vivier.eu> References: <20190821111947.26580-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:LC4f+dfAljIEcCQ1REYw2lGRpTrvXt53bCf+1c1lJIZihbJTgyC 5sWySJUsf9Rmg7bNn7LZ6r84o257RZpjq8lO/NUkGMthXVszNsoDOneT/5gIcZy7caIjxVZ jrIEqkl+ZDzGMN5mLDFLW1f0uh1GegdodD8yn0senDHIwPLe493pdvHEQ9f1vQ+XeztMnPm lf/onC5Rua93OjYvJmizA== X-UI-Out-Filterresults: notjunk:1; V03:K0:PgMaRYuJqzQ=:T/JqyOOFPbLTAWb18T0MgJ phT3UYjHKPJ/jF6OjW68yAmHFrmjpsF/7J3dMP1ObMuM3gqDjQ5lhNIR5f67iwEzFqNfncBBZ c4wFFIjk4uDPa73X64eQMR5Wx1nc9bqycjp/QYfpP8pXG8omSWVO93UpjfCbtE5iAd9d3XAo9 7DVPg6AUdCEfsF0opLCuUFTO7vT0E8EiO2HHybakoLqEYHxAnSp1RAjf0PwV9e4D3B3tE9Iz9 ad21NIw+QJV8K4obEZQcELHSjmx/fNHBxe5muGFFAxmgQ7q63R5PdA98VcBingmJXsK3CXGGp Su5DJSdkgJSGC4IlMIcmvn4NEIA2pB1eN8cwf0PVP9WxcZpRtq8Rv+Swi28J5DPVtY6zRAgzv JlnnEPkzae4tft/FvPxg53adBu7gdS12bDXnRqCumf0P8QzC8wkMayw6swWJaoWUHfIIRzS4U Ss9eyrhyQKdB/ftADt6XjnkSCQr/+9Jprwq5qTISqUitxiP0uvr4vCCB6TJMzI6QI5/uXhpgd GLLORwDbUjToZ7wgaEOuIrhJQIzpUXXA/7iN++OWBQNBxB8NVuKa0GtWr/YHLcbU8BSggPBij y6IbUNgkQ1qC0Rn9q1QJMlXb4yCCs4fSLmFpB1aLvm/DReo0QkN2JdPYVN+xYTXM9lwiQsIMW 7WCt3XRfXUWf6MXZ1uJtFNu1ew1V1WqrQ9lRJh95TVOxh0JcT9L9dIp3QI+nymnGFnzjlw5ds Li+zrlT21DMgONOBXUiEB/ZVmoj+A8tYyiSVWLOJ9Qh7js1fglbMCDLTX5E= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.10 Subject: [Qemu-devel] [PULL 09/14] hw/ipmi: Rewrite a fall through comment 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 , Corey Minyard , Eduardo Habkost , Corey Minyard , Juan Quintela , qemu-trivial@nongnu.org, Stefan Weil , Jason Wang , "Michael S. Tsirkin" , Michael Tokarev , Markus Armbruster , Laurent Vivier , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: hw/ipmi/ipmi_bmc_extern.c: In function ‘addchar’: hw/ipmi/ipmi_bmc_extern.c:178:12: error: this statement may fall through [-Werror=implicit-fallthrough=] 178 | ch |= 0x10; | ~~~^~~~~~~ hw/ipmi/ipmi_bmc_extern.c:181:5: note: here 181 | default: | ^~~~~~~ cc1: all warnings being treated as errors make: *** [rules.mak:69: hw/ipmi/ipmi_bmc_extern.o] Error 1 Rewrite the comment using 'fall through' which is recognized by GCC and static analyzers. Reported-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé Acked-by: Corey Minyard Message-Id: <20190719131425.10835-5-philmd@redhat.com> Signed-off-by: Laurent Vivier Reviewed-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 573428eca1b2..87da9ff99cf5 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -177,8 +177,7 @@ static void addchar(IPMIBmcExtern *ibe, unsigned char ch) ibe->outbuf[ibe->outlen] = VM_ESCAPE_CHAR; ibe->outlen++; ch |= 0x10; - /* No break */ - + /* fall through */ default: ibe->outbuf[ibe->outlen] = ch; ibe->outlen++;