zlib: enumeration values not explicitly handled in switch warning

This commit is contained in:
Philippe Teuwen 2019-10-26 18:34:04 +02:00
parent 5ef4d6dbbb
commit c523980d99
2 changed files with 6 additions and 1 deletions

View file

@ -19,6 +19,7 @@
/* Possible inflate modes between inflate() calls */
typedef enum {
HEAD = 16180, /* i: waiting for magic header */
#ifdef GUNZIP
FLAGS, /* i: waiting for method and flags (gzip) */
TIME, /* i: waiting for modification time (gzip) */
OS, /* i: waiting for extra flags and operating system (gzip) */
@ -27,6 +28,7 @@ typedef enum {
NAME, /* i: waiting for end of file name (gzip) */
COMMENT, /* i: waiting for end of comment (gzip) */
HCRC, /* i: waiting for header crc (gzip) */
#endif
DICTID, /* i: waiting for dictionary check value */
DICT, /* waiting for inflateSetDictionary() call */
TYPE, /* i: waiting for type bits, including last-flag bit */
@ -45,7 +47,9 @@ typedef enum {
MATCH, /* o: waiting for output space to copy string */
LIT, /* o: waiting for output space to write literal */
CHECK, /* i: waiting for 32-bit check value */
#ifdef GUNZIP
LENGTH, /* i: waiting for 32-bit length (gzip) */
#endif
DONE, /* finished check, done -- remain here until reset */
BAD, /* got a data error -- remain here until reset */
MEM, /* got an inflate() memory error -- remain here until reset */

View file

@ -191,7 +191,8 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
extra = lext;
match = 257;
break;
default: /* DISTS */
case DISTS:
default:
base = dbase;
extra = dext;
match = 0;