Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lvandeve/lodepng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLode <lvandeve@gmail.com>2020-02-20 00:32:48 +0300
committerLode <lvandeve@gmail.com>2020-02-20 00:37:34 +0300
commitffe95ec86647a343c333f756dcd6f0fd1e0348fb (patch)
treea245e6934c8651562382229fa7aab788bad84e03
parent48e5364ef48ec2408f44c727657ac1b6703185f8 (diff)
fix potential compiler warning for enum value not handled in switch
-rw-r--r--lodepng.cpp6
-rw-r--r--lodepng.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/lodepng.cpp b/lodepng.cpp
index a7564e7..2ef6766 100644
--- a/lodepng.cpp
+++ b/lodepng.cpp
@@ -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*/
}
}
diff --git a/lodepng.h b/lodepng.h
index 6ce3976..86634d6 100644
--- a/lodepng.h
+++ b/lodepng.h
@@ -1,5 +1,5 @@
/*
-LodePNG version 20200215
+LodePNG version 20200219
Copyright (c) 2005-2020 Lode Vandevenne