diff --git a/3rdparty/stb/stb_image.c b/3rdparty/stb/stb_image.c index 130d6c01d..eac50dafb 100644 --- a/3rdparty/stb/stb_image.c +++ b/3rdparty/stb/stb_image.c @@ -1,6 +1,7 @@ #ifdef __GNUC__ # pragma GCC diagnostic ignored "-Wshadow" # pragma GCC diagnostic ignored "-Warray-bounds" +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #elif defined(_MSC_VER) # pragma warning(disable:4312) // warning C4312: 'type cast': conversion from '' to '' of greater size # pragma warning(disable:4456) // warning C4456: declaration of 'k' hides previous local declaration diff --git a/src/bgfx_p.h b/src/bgfx_p.h index df4aa5e36..ee578365a 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -2794,14 +2794,14 @@ namespace bgfx for (uint32_t ii = 0; ii < count; ++ii) { - uint8_t nameSize; + uint8_t nameSize = 0; bx::read(&reader, nameSize); char name[256]; bx::read(&reader, &name, nameSize); name[nameSize] = '\0'; - uint8_t type; + uint8_t type = 0; bx::read(&reader, type); type &= ~BGFX_UNIFORM_MASK; diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index e82b3cbb4..cfe4b091b 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -4590,7 +4590,7 @@ namespace bgfx { namespace gl for (uint32_t ii = 0; ii < count; ++ii) { - uint8_t nameSize; + uint8_t nameSize = 0; bx::read(&reader, nameSize); char name[256];