Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp224982imm; Wed, 4 Jul 2018 22:21:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeyAKNBQkHWAonVaz8kw4xVH8i5WaIyna1oywaY25RDSHg/qTGB6AWAPZVfzx3nbFbofimA X-Received: by 2002:a17:902:6b47:: with SMTP id g7-v6mr4697519plt.251.1530768069849; Wed, 04 Jul 2018 22:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530768069; cv=none; d=google.com; s=arc-20160816; b=vrQgKsid3DvUUFYJaznWKlwwgbw3qQzMooEsauh/jN0ZM8mD4DmPgLbC8L3luOXEHT m9gbBeF9gfxv25RdJJNLuKGQByIVA6dcndGqnvQMhATKen2aBU6CczhHcCSOQeDL+ye5 dyT7Lwwg9NVng6w1G/4ZbWo8uyrAW0clrO5mzJjI7PqwbzEN56fGkGW8HwoA6ehqTSvV 0OSk1xJXDj2gZ22FT3mh1lzUkypHjBya1mpaZrNwp082IUJiMSKj68ktuvI6YqCxuYv4 8Crt95j+eaSqKWxLCBQdokA4wEtuAGpf5eKbi6owWYxhpnPYle6qTrWLxup/eLGX4lbt PpkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=2eXlVhSkTKsCpSBDkL3ZbPSzmE50Bsap0W9dt7zwnfU=; b=mt/xv3It/ZG3BB/GY7wo5Rsiker9rfp1enSm29YhXm9iy/+u9Gxj5F7/S9TZ29eD4r qUDNioWkM9a1ia7OQH84h0jAglvmeg+91jzd95TgaGkH29QNwaNVrgQ/6oMQRnUKh0nE PeUii6xGOfntRWKT8LmUujgnAKswP2SrV0JmQgNRsgTd5PMmm3Zj9sUh07zR0EKRTgg9 9G6DyRM8k1HtOApBKgMHUEWFXf2Nn+EybjhSzH0XCSEQ31rt18yXfJ1RSp0cKQ6zG8jL EOqomxpuU8ZlCLwBd12smSc801ZqqX+BMDBLCcEv7u+9c0eoLYFdG8mOwzezVQjoozad Y5Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=XBGfjxUm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m37-v6si5412256pla.148.2018.07.04.22.20.55; Wed, 04 Jul 2018 22:21:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=XBGfjxUm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753272AbeGEFTp (ORCPT + 99 others); Thu, 5 Jul 2018 01:19:45 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:54885 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752851AbeGEFTo (ORCPT ); Thu, 5 Jul 2018 01:19:44 -0400 Received: by mail-wm0-f67.google.com with SMTP id i139-v6so8795710wmf.4 for ; Wed, 04 Jul 2018 22:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=2eXlVhSkTKsCpSBDkL3ZbPSzmE50Bsap0W9dt7zwnfU=; b=XBGfjxUmjKiowwqc9/CCo79TP9ZLiHd1ErHJe+QpNUiLlNdthDwiJBqgAtD1fdTi1N xHCJ59V1JtwuwAargJbNLs/Oxk9pf3uugS/f2mIiHxsrXRz421GSGkhqLh9dYemmxQa4 Irgr1X3z2rHlQghjg1+YSoFB+0uqpiJ10mkq9aENn6Is0ZMmeoi6mI6KKlnGOy3+5kkf PLtM/JIxfQ9UfF3OdHqf/QHpVfyMWnuOnxUcF+u+Min9I0g43BvzQNHIZLn4YAVY816Q SHf7WSRCM41ifbkJF3DeAkXkFGMV6BfFg+LCOM8+PYGPqlq5E2aOa886udStOsBu+BoU fCwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2eXlVhSkTKsCpSBDkL3ZbPSzmE50Bsap0W9dt7zwnfU=; b=f7RKnMalU/ymcWobf1bZJ65tT4mGvI2PQdr0pL/BiGMvt3J9Q4Vtq1NWFVhpbrlXF/ ok7oIHXwKBUUJTTbc1RZ5LR9Xgah4XSNIx70LtMvHO8lG4hOowcLnMeVp9blv3nkFzgM K2HhqGwCt68w8bNcCdzZGOuaLLcWm2+hdJZb8RPH8yxCESHSH8kUzPgR32YaCtt9vKPT LvYwR3lOp2KpIrtTJ6meuNlPlDMbY0Sm0Fztc7Lfsv/SqHqtiJPsXvQ5fI+n1j1FTWAP VoA/OKcEAPgFvZ7Ij3TXauogFyVvwTRsNSRK3R4IVerPPEtQG+NOP+XRC8Y452jqKRYN xjZw== X-Gm-Message-State: APt69E2aTdw8AIuSMjIOELmQ2P6kk2metcmrcnPsPdVKjSZXYjUqGE7Q LaFjmg+Tdks1F2FF8zghuIHPwQ== X-Received: by 2002:a1c:2e90:: with SMTP id u138-v6mr2821908wmu.156.1530767983245; Wed, 04 Jul 2018 22:19:43 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id e13-v6sm11521214wrd.9.2018.07.04.22.19.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jul 2018 22:19:42 -0700 (PDT) From: Corentin Labbe To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH] zlib: remove fall through warnings Date: Thu, 5 Jul 2018 05:18:37 +0000 Message-Id: <1530767917-20443-1-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch remove all following fall through warnings by adding /* fall through */ markers. Note that we cannot add "__attribute__ ((fallthrough));" due to it is GCC7 only arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:384:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:391:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:393:16: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:430:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:556:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:595:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:602:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:627:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:646:25: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arm/boot/compressed/../../../../lib/zlib_inflate/inflate.c:696:25: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Corentin Labbe --- lib/zlib_inflate/inflate.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c index 58a733b10387..48f14cd58c77 100644 --- a/lib/zlib_inflate/inflate.c +++ b/lib/zlib_inflate/inflate.c @@ -382,6 +382,7 @@ int zlib_inflate(z_streamp strm, int flush) strm->adler = state->check = REVERSE(hold); INITBITS(); state->mode = DICT; + /* fall through */ case DICT: if (state->havedict == 0) { RESTORE(); @@ -389,8 +390,10 @@ int zlib_inflate(z_streamp strm, int flush) } strm->adler = state->check = zlib_adler32(0L, NULL, 0); state->mode = TYPE; + /* fall through */ case TYPE: if (flush == Z_BLOCK) goto inf_leave; + /* fall through */ case TYPEDO: if (state->last) { BYTEBITS(); @@ -428,6 +431,7 @@ int zlib_inflate(z_streamp strm, int flush) state->length = (unsigned)hold & 0xffff; INITBITS(); state->mode = COPY; + /* fall through */ case COPY: copy = state->length; if (copy) { @@ -461,6 +465,7 @@ int zlib_inflate(z_streamp strm, int flush) #endif state->have = 0; state->mode = LENLENS; + /* fall through */ case LENLENS: while (state->have < state->ncode) { NEEDBITS(3); @@ -481,6 +486,7 @@ int zlib_inflate(z_streamp strm, int flush) } state->have = 0; state->mode = CODELENS; + /* fall through */ case CODELENS: while (state->have < state->nlen + state->ndist) { for (;;) { @@ -554,6 +560,7 @@ int zlib_inflate(z_streamp strm, int flush) break; } state->mode = LEN; + /* fall through */ case LEN: if (have >= 6 && left >= 258) { RESTORE(); @@ -593,6 +600,7 @@ int zlib_inflate(z_streamp strm, int flush) } state->extra = (unsigned)(this.op) & 15; state->mode = LENEXT; + /* fall through */ case LENEXT: if (state->extra) { NEEDBITS(state->extra); @@ -600,6 +608,7 @@ int zlib_inflate(z_streamp strm, int flush) DROPBITS(state->extra); } state->mode = DIST; + /* fall through */ case DIST: for (;;) { this = state->distcode[BITS(state->distbits)]; @@ -625,6 +634,7 @@ int zlib_inflate(z_streamp strm, int flush) state->offset = (unsigned)this.val; state->extra = (unsigned)(this.op) & 15; state->mode = DISTEXT; + /* fall through */ case DISTEXT: if (state->extra) { NEEDBITS(state->extra); @@ -644,6 +654,7 @@ int zlib_inflate(z_streamp strm, int flush) break; } state->mode = MATCH; + /* fall through */ case MATCH: if (left == 0) goto inf_leave; copy = out - left; @@ -694,6 +705,7 @@ int zlib_inflate(z_streamp strm, int flush) INITBITS(); } state->mode = DONE; + /* fall through */ case DONE: ret = Z_STREAM_END; goto inf_leave; -- 2.16.4