Opened 6 years ago
Last modified 2 years ago
#5294 new defect
GCC 8 compiler warnings
Reported by: | elexis | Owned by: | Alex |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: | Phab:D2055, Phab:D2099, Phab:D2102, Phab:D2153 |
Description (last modified by )
When I compile 0ad with gcc 8.1.0, I get the following warnings:
==================================================================================================================================================================================== In file included from ../../../source/pch/atlas/precompiled.h:24: ../../../source/tools/atlas/GameInterface/Messages.h: In function ‘void AtlasMessage::fGetTerrainGroupPreviews(AtlasMessage::qGetTerrainGroupPreviews*)’: ../../../source/tools/atlas/GameInterface/Messages.h:292:8: warning: ‘#‘target_mem_ref’ not supported by dump_expr#<expression error>’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct sTerrainTexturePreview ^~~~~~~~~~~~~~~~~~~~~~ ../../../source/tools/atlas/GameInterface/Messages.h:292:8: warning: ‘#‘target_mem_ref’ not supported by dump_expr#<expression error>’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../../../source/tools/atlas/GameInterface/Messages.h:292:8: warning: ‘#‘target_mem_ref’ not supported by dump_expr#<expression error>’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../../../source/tools/atlas/GameInterface/Messages.h:292:8: warning: ‘#‘target_mem_ref’ not supported by dump_expr#<expression error>’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct sTerrainTexturePreview ^~~~~~~~~~~~~~~~~~~~~~ ../../../source/tools/atlas/GameInterface/Messages.h:292:8: warning: ‘#‘target_mem_ref’ not supported by dump_expr#<expression error>’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../../../source/tools/atlas/GameInterface/Messages.h:292:8: warning: ‘#‘target_mem_ref’ not supported by dump_expr#<expression error>’ may be used uninitialized in this function [-Wmaybe-uninitialized] ==================================================================================================================================================================================== ../../../source/third_party/mongoose/mongoose.cpp: In function ‘mg_context* mg_start(mg_callback_t, void*, const char**)’: ../../../source/third_party/mongoose/mongoose.cpp:4297:40: warning: cast between incompatible function types from ‘void (*)(mg_context*)’ to ‘mg_thread_func_t’ {aka ‘void* (*)(void*)’} [-Wcast-function-type] start_thread(ctx, (mg_thread_func_t) master_thread, ctx); ^~~~~~~~~~~~~ ../../../source/third_party/mongoose/mongoose.cpp:4301:46: warning: cast between incompatible function types from ‘void (*)(mg_context*)’ to ‘mg_thread_func_t’ {aka ‘void* (*)(void*)’} [-Wcast-function-type] if (start_thread(ctx, (mg_thread_func_t) worker_thread, ctx) != 0) { ====================================================================================================================================================================================
Attachments (1)
Change History (27)
comment:1 by , 5 years ago
Keywords: | simple added |
---|---|
Milestone: | Backlog → Alpha 24 |
comment:2 by , 5 years ago
Owner: | set to |
---|
comment:3 by , 5 years ago
Description: | modified (diff) |
---|
by , 5 years ago
Attachment: | build-log.txt added |
---|
More than tenthousand compiler warnings with GCC 9
comment:4 by , 5 years ago
Keywords: | simple removed |
---|---|
Patch: | → Phab:D2055 |
comment:6 by , 5 years ago
Patch: | Phab:D2055 → Phab:D2055,Phab:D2099 |
---|
comment:8 by , 5 years ago
Patch: | Phab:D2055,Phab:D2099 → Phab:D2055,Phab:D2099,Phab:D2102 |
---|
comment:9 by , 5 years ago
Patch: | Phab:D2055,Phab:D2099,Phab:D2102 → Phab:D2055, Phab:D2099, Phab:D2102 |
---|
comment:10 by , 5 years ago
clang warnings as of r22601:
Atlas one comes from r22335 which has a proposed solution in Phab:rP22335. glooxwrapper one comes from r19703 and has a proposed solution in Phab:D2094.
In file included from ../../../source/lobby/glooxwrapper/glooxwrapper.cpp:20: ../../../source/lobby/glooxwrapper/glooxwrapper.h:642:10: warning: private field 'm_Owned' is not used [-Wunused-private-field] bool m_Owned; ^ --------------------------------------------------------------------------------------------------- In file included from ../../../source/ps/XML/XeroXMB.cpp:20: In file included from ../../../source/ps/XML/Xeromyces.h:32: ../../../source/ps/XML/XeroXMB.h:221:15: warning: private field 'm_Pointer' is not used [-Wunused-private-field] const char* m_Pointer; ^ ../../../source/ps/XML/XeroXMB.h:290:15: warning: private field 'm_Pointer' is not used [-Wunused-private-field] const char* m_Pointer; ^ --------------------------------------------------------------------------------------------------- ../../../source/lib/res/h_mgr.cpp:99:18: warning: unused variable 'TAG_MASK' [-Wunused-const-variable] static const u64 TAG_MASK = 0xFFFFFFFF; // safer than (1 << 32) - 1 ^ ../../../source/lib/res/h_mgr.cpp:114:19: warning: unused function 'h_tag' [-Wunused-function] static inline Tag h_tag(Handle h) ^ --------------------------------------------------------------------------------------------------- ../../../source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp:175:50: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare] if (in["Object"]["Properties"]["@autoflatten"] == "1") ^ ~~~ ../../../source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp:178:50: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare] if (in["Object"]["Properties"]["@castshadows"] == "1") ^ ~~~
comment:12 by , 5 years ago
Patch: | Phab:D2055, Phab:D2099, Phab:D2102 → Phab:D2055, Phab:D2099, Phab:D2102,Phab:D2153 |
---|
comment:18 by , 4 years ago
Patch: | Phab:D2055, Phab:D2099, Phab:D2102,Phab:D2153 → Phab:D2055, Phab:D2099, Phab:D2102, Phab:D2153 |
---|
Add a space so we can click on differentials
comment:19 by , 3 years ago
Description: | modified (diff) |
---|
Most of the warnings were fixed, only those remain now
comment:20 by , 3 years ago
I also get:
test_MapGenerator.cpp In file included from ../../../source/lib/os_path.h:26, from ../../../source/lib/self_test.h:28, from ../../../source/simulation2/system/ComponentTest.h:21, from ../../../source/pch/test/precompiled.h:22: ../../../source/lib/path.h: In member function ‘virtual void TestMapGenerator::setUp()’: ../../../source/lib/path.h:265:68: warning: ‘<anonymous>.Path::separator’ may be used uninitialized in this function [-Wmaybe-uninitialized] debug_printf("Path %s, separator %c\n", string8().c_str(), (char)separator); =============================================================== test_scripts.cpp In file included from ../../../source/lib/os_path.h:26, from ../../../source/lib/self_test.h:28, from ../../../source/simulation2/system/ComponentTest.h:21, from ../../../source/pch/test/precompiled.h:22: ../../../source/lib/path.h: In member function ‘virtual void TestComponentScripts::setUp()’: ../../../source/lib/path.h:265:68: warning: ‘<anonymous>.Path::separator’ may be used uninitialized in this function [-Wmaybe-uninitialized] debug_printf("Path %s, separator %c\n", string8().c_str(), (char)separator); ^~~~~~~~~ ==================================================== In file included from ../../../source/lib/os_path.h:26, from ../../../source/lib/self_test.h:28, from ../../../source/simulation2/system/ComponentTest.h:21, from ../../../source/pch/test/precompiled.h:22: ../../../source/lib/path.h: In function ‘OsPath DataDir()’: ../../../source/lib/path.h:265:68: warning: ‘<anonymous>.Path::separator’ may be used uninitialized in this function [-Wmaybe-uninitialized] debug_printf("Path %s, separator %c\n", string8().c_str(), (char)separator); ^~~~~~~~~
with GCC 8.4.
comment:23 by , 3 years ago
Milestone: | Alpha 25 → Alpha 26 |
---|
comment:24 by , 2 years ago
Description: | modified (diff) |
---|
comment:26 by , 2 years ago
Milestone: | Alpha 26 → Backlog |
---|
Note:
See TracTickets
for help on using tickets.
Phab:D1395, Phab:D1432 for the Atlas one.