From 0224a44a10564a214595797b4c88323f79a5f934 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Sun, 2 Feb 2020 20:30:25 -0800 Subject: [PATCH] stb_image: fix new warnings --- README.md | 4 ++-- stb_image.h | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 36bd4f3..20446bc 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ by Jorge L. "VinoBS" Rodriguez, and stb_sprintf by Jeff Roberts. library | lastest version | category | LoC | description --------------------- | ---- | -------- | --- | -------------------------------- **[stb_vorbis.c](stb_vorbis.c)** | 1.18 | audio | 5554 | decode ogg vorbis files from file/memory to float/16-bit signed output -**[stb_image.h](stb_image.h)** | 2.23 | graphics | 7658 | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC +**[stb_image.h](stb_image.h)** | 2.25 | graphics | 7656 | image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC **[stb_truetype.h](stb_truetype.h)** | 1.23 | graphics | 5001 | parse, decode, and rasterize characters from truetype fonts **[stb_image_write.h](stb_image_write.h)** | 1.14 | graphics | 1666 | image writing to disk: PNG, TGA, BMP **[stb_image_resize.h](stb_image_resize.h)** | 0.96 | graphics | 2631 | resize images larger/smaller with good quality @@ -44,7 +44,7 @@ library | lastest version | category | LoC | description **[stb_include.h](stb_include.h)** | 0.02 | misc | 295 | implement recursive #include support, particularly for GLSL Total libraries: 22 -Total lines of C code: 56551 +Total lines of C code: 56549 FAQ diff --git a/stb_image.h b/stb_image.h index d529acc..2857f05 100644 --- a/stb_image.h +++ b/stb_image.h @@ -1,4 +1,4 @@ -/* stb_image - v2.23 - public domain image loader - http://nothings.org/stb +/* stb_image - v2.25 - public domain image loader - http://nothings.org/stb no warranty implied; use at your own risk Do this: @@ -48,6 +48,7 @@ LICENSE RECENT REVISION HISTORY: + 2.25 (2020-02-02) fix warnings 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically 2.23 (2019-08-11) fix clang static analysis warning 2.22 (2019-03-04) gif fixes, fix warnings @@ -92,7 +93,7 @@ RECENT REVISION HISTORY: Carmelo J Fdez-Aguera Bug & warning fixes - Marc LeBlanc David Woo Guillaume George Martins Mozeiko Alexander Veselov + Marc LeBlanc David Woo Guillaume George Martins Mozeiko Christpher Lloyd Jerry Jansson Joseph Thomson Phil Jordan Dave Moore Roy Eltham Hayaki Saito Nathan Reed Won Chun Luke Graham Johan Duparc Nick Verigakis @@ -107,8 +108,7 @@ RECENT REVISION HISTORY: Julian Raschke Gregory Mullen Baldur Karlsson github:poppolopoppo Christian Floisand Kevin Schmidt JR Smith github:darealshinji Brad Weinberger Matvey Cherevko github:Michaelangel007 - Blazej Dariusz Roszkowski - + Blazej Dariusz Roszkowski Alexander Veselov */ #ifndef STBI_INCLUDE_STB_IMAGE_H @@ -473,9 +473,7 @@ STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); // as above, but only applies to images loaded on the thread that calls the function // this function is only available if your compiler supports thread-local variables; // calling it will fail to link if your compiler doesn't -#if __cplusplus >= 201103L || __STDC_VERSION_ >= 201112L || defined(__GNUC__) || defined(_MSC_VER) STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip); -#endif // ZLIB client - used by PNG, available for other purposes @@ -574,9 +572,9 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch #endif #ifndef STBI_NO_THREAD_LOCALS - #if __cplusplus >= 201103L + #if defined(__cplusplus) && __cplusplus >= 201103L #define STBI_THREAD_LOCAL thread_local - #elif __STDC_VERSION_ >= 201112L + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #define STBI_THREAD_LOCAL _Thread_local #elif defined(__GNUC__) #define STBI_THREAD_LOCAL __thread