Update LodePNG, add -Wswitch-enum option.
This commit is contained in:
parent
63e6497f62
commit
593872ad06
@ -1,5 +1,5 @@
|
||||
/*
|
||||
LodePNG version 20200215
|
||||
LodePNG version 20200219
|
||||
|
||||
Copyright (c) 2005-2020 Lode Vandevenne
|
||||
|
||||
@ -44,7 +44,7 @@ Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for
|
||||
#pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/
|
||||
#endif /*_MSC_VER */
|
||||
|
||||
const char* LODEPNG_VERSION_STRING = "20200215";
|
||||
const char* LODEPNG_VERSION_STRING = "20200219";
|
||||
|
||||
/*
|
||||
This source file is built up in the following large parts. The code sections
|
||||
@ -2606,6 +2606,7 @@ static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) {
|
||||
case LCT_PALETTE: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 )) return 37; break;
|
||||
case LCT_GREY_ALPHA: if(!( bd == 8 || bd == 16)) return 37; break;
|
||||
case LCT_RGBA: if(!( bd == 8 || bd == 16)) return 37; break;
|
||||
case LCT_MAX_OCTET_VALUE: return 31; /* invalid color type */
|
||||
default: return 31; /* invalid color type */
|
||||
}
|
||||
return 0; /*allowed color type / bits combination*/
|
||||
@ -2618,6 +2619,7 @@ static unsigned getNumColorChannels(LodePNGColorType colortype) {
|
||||
case LCT_PALETTE: return 1;
|
||||
case LCT_GREY_ALPHA: return 2;
|
||||
case LCT_RGBA: return 4;
|
||||
case LCT_MAX_OCTET_VALUE: return 0; /* invalid color type */
|
||||
default: return 0; /*invalid color type*/
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
LodePNG version 20200215
|
||||
LodePNG version 20200219
|
||||
|
||||
Copyright (c) 2005-2020 Lode Vandevenne
|
||||
|
||||
|
2
makefile
2
makefile
@ -1,6 +1,6 @@
|
||||
FASM=fasm
|
||||
CC=gcc
|
||||
WARNINGS=-Wall -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wjump-misses-init -Wshadow -Wformat=2 -Wswitch #-Wswitch-enum #-Wconversion -Wsign-conversion
|
||||
WARNINGS=-Wall -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wjump-misses-init -Wshadow -Wformat=2 -Wswitch -Wswitch-enum #-Wconversion -Wsign-conversion
|
||||
CFLAGS=$(WARNINGS) -g -O0 -D_FILE_OFFSET_BITS=64 -Wno-address-of-packed-member -DNDEBUG -masm=intel
|
||||
CFLAGS_32=$(CFLAGS) -m32
|
||||
LDFLAGS=
|
||||
|
Loading…
Reference in New Issue
Block a user