Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 9: error: '<anonymous>.ShaderGLES2::Version::frag_id' is used uninitialized in this function [-Werror=uninitialized] #33240

Closed
marxin opened this issue Nov 1, 2019 · 0 comments · Fixed by #33583
Milestone

Comments

@marxin
Copy link
Contributor

marxin commented Nov 1, 2019

Godot version:

ce352ce

OS/device including version:

Issue description:

I see a compilation warning with GCC 9:

$ scons progress=yes verbose=yes -j1 platform=x11 tools=no   target=release_debug warnings=extra use_lto=0 werror=1
...
[ 65%] g++ -o drivers/gles2/shader_gles2.x11.opt.debug.64.o -c -std=c++11 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wnoexcept -Wplacement-new=1 -g1 -O2 -pipe -fpie -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wshadow-local -Walloc-zero -Wduplicated-branches -Wduplicated-cond -Wstringop-overflow=4 -Wlogical-op -Wattribute-alias=2 -Werror -DDEBUG_ENABLED -DTOUCH_ENABLED -DALSA_ENABLED -DALSAMIDI_ENABLED -DPULSEAUDIO_ENABLED -D_REENTRANT -DJOYDEV_ENABLED -DX11_ENABLED -DUNIX_ENABLED -DOPENGL_ENABLED -DGLES_ENABLED -DPTRCALL_ENABLED -DGDSCRIPT_ENABLED -DMINIZIP_ENABLED -DZSTD_STATIC_LINKING_ONLY -DGLAD_ENABLED -DGLES_OVER_GL -DFREETYPE_ENABLED -DSVG_ENABLED -DHAVE_MNTENT -Ithirdparty/nanosvg -Ithirdparty/freetype/include -Ithirdparty/libpng -Ithirdparty/glad -Ithirdparty/zstd -Ithirdparty/zlib -Iplatform/x11 -I. drivers/gles2/shader_gles2.cpp

In file included from drivers/gles2/shader_gles2.cpp:31:
drivers/gles2/shader_gles2.h: In member function 'HashMap<TKey, TData, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::Element* HashMap<TKey, TData, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::create_element(const TKey&) [with TKey = ShaderGLES2::VersionKey; TData = ShaderGLES2::Version; Hasher = ShaderGLES2::VersionKeyHash; Comparator = HashMapComparatorDefault<ShaderGLES2::VersionKey>; unsigned char MIN_HASH_TABLE_POWER = 3; unsigned char RELATIONSHIP = 8]':
drivers/gles2/shader_gles2.h:110:9: error: '<anonymous>.ShaderGLES2::Version::frag_id' is used uninitialized in this function [-Werror=uninitialized]
  110 |  struct Version {
      |         ^~~~~~~
drivers/gles2/shader_gles2.h:110:9: error: '<anonymous>' is used uninitialized in this function [-Werror=uninitialized]
cc1plus: all warnings being treated as errors
scons: *** [drivers/gles2/shader_gles2.x11.opt.debug.64.o] Error 1
scons: building terminated because of errors.

Steps to reproduce:
The issue started with the mentioned revision. One can see it here:
https://travis-ci.org/godotengine/godot/jobs/606026116?utm_medium=notification&utm_source=github_status

Minimal reproduction project:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants