Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net add fallthrough's



details:   https://anonhg.NetBSD.org/src/rev/f456e3388e2a
branches:  trunk
changeset: 839409:f456e3388e2a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 18 23:13:14 2019 +0000

description:
add fallthrough's

diffstat:

 sys/net/zlib.c |  34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diffs (196 lines):

diff -r ad886b9d6292 -r f456e3388e2a sys/net/zlib.c
--- a/sys/net/zlib.c    Mon Feb 18 20:27:20 2019 +0000
+++ b/sys/net/zlib.c    Mon Feb 18 23:13:14 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $       */
+/*     $NetBSD: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $       */
 /*
  * This file is derived from various .h and .c files from the zlib-1.0.4
  * distribution by Jean-loup Gailly and Mark Adler, with some additions
@@ -11,7 +11,7 @@
  * - added inflateIncomp and deflateOutputPending
  * - allow strm->next_out to be NULL, meaning discard the output
  *
- * $Id: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $
+ * $Id: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $
  */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $");
 
 #define NO_DUMMY_DECL
 #define NO_ZCFUNCS
@@ -45,7 +45,7 @@
    subject to change. Applications should only use zlib.h.
  */
 
-/* @(#) $Id: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $ */
+/* @(#) $Id: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $ */
 
 #ifndef _Z_UTIL_H
 #define _Z_UTIL_H
@@ -294,7 +294,7 @@
    subject to change. Applications should only use zlib.h.
  */
 
-/* @(#) $Id: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $ */
+/* @(#) $Id: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $ */
 
 #ifndef _DEFLATE_H
 #define _DEFLATE_H
@@ -656,7 +656,7 @@
  *
  */
 
-/* @(#) $Id: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $ */
+/* @(#) $Id: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $ */
 
 /* #include "deflate.h" */
 
@@ -1999,7 +1999,7 @@
  *          Addison-Wesley, 1983. ISBN 0-201-06672-6.
  */
 
-/* @(#) $Id: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $ */
+/* @(#) $Id: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $ */
 
 /* #define GEN_TREES_H */
 
@@ -3529,6 +3529,7 @@
         break;
       }
       z->state->mode = FLAG;
+      /*FALLTHROUGH*/
     case FLAG:
       NEEDBYTE
       b = NEXTBYTE;
@@ -3546,18 +3547,22 @@
         break;
       }
       z->state->mode = DICT4;
+      /*FALLTHROUGH*/
     case DICT4:
       NEEDBYTE
       z->state->sub.check.need = (uLong)NEXTBYTE << 24;
       z->state->mode = DICT3;
+      /*FALLTHROUGH*/
     case DICT3:
       NEEDBYTE
       z->state->sub.check.need += (uLong)NEXTBYTE << 16;
       z->state->mode = DICT2;
+      /*FALLTHROUGH*/
     case DICT2:
       NEEDBYTE
       z->state->sub.check.need += (uLong)NEXTBYTE << 8;
       z->state->mode = DICT1;
+      /*FALLTHROUGH*/
     case DICT1:
       NEEDBYTE
       z->state->sub.check.need += (uLong)NEXTBYTE;
@@ -3591,18 +3596,22 @@
         break;
       }
       z->state->mode = CHECK4;
+      /*FALLTHROUGH*/
     case CHECK4:
       NEEDBYTE
       z->state->sub.check.need = (uLong)NEXTBYTE << 24;
       z->state->mode = CHECK3;
+      /*FALLTHROUGH*/
     case CHECK3:
       NEEDBYTE
       z->state->sub.check.need += (uLong)NEXTBYTE << 16;
       z->state->mode = CHECK2;
+      /*FALLTHROUGH*/
     case CHECK2:
       NEEDBYTE
       z->state->sub.check.need += (uLong)NEXTBYTE << 8;
       z->state->mode = CHECK1;
+      /*FALLTHROUGH*/
     case CHECK1:
       NEEDBYTE
       z->state->sub.check.need += (uLong)NEXTBYTE;
@@ -3616,6 +3625,7 @@
       }
       Tracev((stderr, "inflate: zlib check ok\n"));
       z->state->mode = DONE;
+      /*FALLTHROUGH*/
     case DONE:
       return Z_STREAM_END;
     case BAD:
@@ -4197,6 +4207,7 @@
       s->sub.trees.index = 0;
       Tracev((stderr, "inflate:       bits tree ok\n"));
       s->mode = DTREE;
+      /*FALLTHROUGH*/
     case DTREE:
       while (t = s->sub.trees.table,
              s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
@@ -4272,6 +4283,7 @@
       }
       ZFREE(z, s->sub.trees.blens);
       s->mode = CODES;
+      /*FALLTHROUGH*/
     case CODES:
       UPDATE
       if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
@@ -4288,11 +4300,13 @@
         break;
       }
       s->mode = DRY;
+      /*FALLTHROUGH*/
     case DRY:
       FLUSH
       if (s->read != s->write)
         LEAVE
       s->mode = DONEB;
+      /*FALLTHROUGH*/
     case DONEB:
       r = Z_STREAM_END;
       LEAVE
@@ -5155,6 +5169,7 @@
       c->sub.code.need = c->lbits;
       c->sub.code.tree = c->ltree;
       c->mode = LEN;
+      /*FALLTHROUGH*/
     case LEN:           /* i: get length/literal/eob next */
       j = c->sub.code.need;
       NEEDBITS(j)
@@ -5202,6 +5217,7 @@
       c->sub.code.tree = c->dtree;
       Tracevv((stderr, "inflate:         length %u\n", c->len));
       c->mode = DIST;
+      /*FALLTHROUGH*/
     case DIST:          /* i: get distance next */
       j = c->sub.code.need;
       NEEDBITS(j)
@@ -5232,6 +5248,7 @@
       DUMPBITS(j)
       Tracevv((stderr, "inflate:         distance %u\n", c->sub.copy.dist));
       c->mode = COPY;
+      /*FALLTHROUGH*/
     case COPY:          /* o: copying bytes in window, waiting for space */
       f = q - c->sub.copy.dist;
       while (f < s->window)             /* modulo window size-"while" instead */
@@ -5263,6 +5280,7 @@
       if (s->read != s->write)
         LEAVE
       c->mode = END;
+      /*FALLTHROUGH*/
     case END:
       r = Z_STREAM_END;
       LEAVE
@@ -5813,7 +5831,7 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
-/* @(#) $Id: zlib.c,v 1.34 2013/12/29 08:09:44 pgoyette Exp $ */
+/* @(#) $Id: zlib.c,v 1.35 2019/02/18 23:13:14 christos Exp $ */
 
 /* #include "zlib.h" */
 



Home | Main Index | Thread Index | Old Index