From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlelc-0000pl-MG for qemu-devel@nongnu.org; Fri, 13 Jan 2012 05:54:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rleky-0001M7-Ki for qemu-devel@nongnu.org; Fri, 13 Jan 2012 05:53:23 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:59272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rleky-0001KE-Bh for qemu-devel@nongnu.org; Fri, 13 Jan 2012 05:53:12 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jan 2012 10:53:01 -0000 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0DAqtDR2527454 for ; Fri, 13 Jan 2012 10:52:55 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0DAqsBa014800 for ; Fri, 13 Jan 2012 03:52:54 -0700 From: Stefan Hajnoczi Date: Fri, 13 Jan 2012 10:51:35 +0000 Message-Id: <1326451900-18325-8-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1326451900-18325-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1326451900-18325-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 07/12] Add 'fall through' comments to case statements without break List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi From: Stefan Weil These comments are used by static code analysis tools and in code reviews to avoid false warnings because of missing break statements. The case statements handled here were reported by coverity. Reviewed-by: Peter Maydell Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/pcnet.c | 1 + json-lexer.c | 1 + qemu-option.c | 4 ++++ 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/pcnet.c b/hw/pcnet.c index cba253b..306dc6e 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -1505,6 +1505,7 @@ static void pcnet_bcr_writew(PCNetState *s, uint32_t rap, uint32_t val) #ifdef PCNET_DEBUG printf("BCR_SWS=0x%04x\n", val); #endif + /* fall through */ case BCR_LNKST: case BCR_LED1: case BCR_LED2: diff --git a/json-lexer.c b/json-lexer.c index c21338f..3cd3285 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -301,6 +301,7 @@ static int json_lexer_feed_char(JSONLexer *lexer, char ch, bool flush) case JSON_KEYWORD: case JSON_STRING: lexer->emit(lexer, lexer->token, new_state, lexer->x, lexer->y); + /* fall through */ case JSON_SKIP: QDECREF(lexer->token); lexer->token = qstring_new(); diff --git a/qemu-option.c b/qemu-option.c index 6b23c31..a303f87 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -214,13 +214,17 @@ static int parse_option_size(const char *name, const char *value, uint64_t *ret) switch (*postfix) { case 'T': sizef *= 1024; + /* fall through */ case 'G': sizef *= 1024; + /* fall through */ case 'M': sizef *= 1024; + /* fall through */ case 'K': case 'k': sizef *= 1024; + /* fall through */ case 'b': case '\0': *ret = (uint64_t) sizef; -- 1.7.7.3