Opened 5 years ago
Last modified 16 months ago
#5550 new defect
Compiler warnings as of May 2022 (macOS, LLVM 10)
Reported by: | Krinkle | Owned by: | Stan |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: | Phab:D3177 |
Description
On latest trunk as of writing (r22600)
$ clang --version Apple LLVM version 10.0.1 (clang-1001.0.46.4) build/workspaces$ ./clean-workspaces.sh build/workspaces$ ./update-workspaces.sh build/workspaces/gcc$ make pyrogenesis -j4
Short version
==== Building glooxwrapper (release) ==== glooxwrapper.h:642:10: warning: private field 'm_Owned' is not used ==== Building engine (release) ==== ../../../source/gui/IGUITextOwner.h:67:15: warning: 'HandleMessage' overrides a member function but is not marked 'override' ../../../source/gui/IGUITextOwner.h:72:15: warning: 'UpdateCachedSize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ../../../source/gui/IGUITextOwner.h:89:15: warning: 'MouseOverIcon' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ../../../source/ps/XML/XeroXMB.h:221:15: warning: private field 'm_Pointer' is not used [-Wunused-private-field] ../../../source/ps/XML/XeroXMB.h:290:15: warning: private field 'm_Pointer' is not used [-Wunused-private-field] ==== Building atlas (release) ==== ../../../source/gui/IGUITextOwner.h:67:15: warning: 'HandleMessage' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ../../../source/gui/IGUITextOwner.h:72:15: warning: 'UpdateCachedSize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ../../../source/gui/IGUITextOwner.h:89:15: warning: 'MouseOverIcon' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ==== Building gui (release) ==== ../../../source/gui/IGUITextOwner.h:67:15: warning: 'HandleMessage' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ../../../source/gui/IGUITextOwner.h:72:15: warning: 'UpdateCachedSize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ../../../source/gui/IGUITextOwner.h:89:15: warning: 'MouseOverIcon' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ==== Building lowlevel (release) ==== ../../../source/lib/res/h_mgr.cpp:99:18: warning: unused variable 'TAG_MASK' [-Wunused-const-variable] ../../../source/lib/res/h_mgr.cpp:114:19: warning: unused function 'h_tag' [-Wunused-function] ../../../source/lib/sysdep/os/osx/osx.cpp:91:7: warning: comparison of function 'CGDisplayCopyDisplayMode' not equal to a null pointer is always true [-Wtautological-pointer-compare] ../../../source/lib/sysdep/os/osx/osx.cpp:122:7: warning: comparison of function 'CGDisplayCopyDisplayMode' not equal to a null pointer is always true ../../../source/lib/sysdep/os/unix/unix.cpp:66:67: warning: unused parameter 'text' [-Wunused-parameter] ../../../source/lib/sysdep/os/unix/unix.cpp:66:78: warning: unused parameter 'manual_break' [-Wunused-parameter] ../../../source/lib/sysdep/os/unix/unix.cpp:66:97: warning: unused parameter 'allow_suppress' [-Wunused-parameter] ../../../source/lib/sysdep/os/unix/unix.cpp:66:118: warning: unused parameter 'no_continue' [-Wunused-parameter]
Long version with notes
==== Building glooxwrapper (release) ==== 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; ^ ==== Building engine (release) ==== In file included from ../../../source/ps/GameSetup/GameSetup.cpp:38: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:67:15: warning: 'HandleMessage' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void HandleMessage(SGUIMessage& Message); ^ ../../../source/gui/IGUIObject.h:291:15: note: overridden virtual function is here virtual void HandleMessage(SGUIMessage& UNUSED(Message)) {} ^ In file included from ../../../source/ps/GameSetup/GameSetup.cpp:38: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:72:15: warning: 'UpdateCachedSize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void UpdateCachedSize(); ^ ../../../source/gui/IGUIObject.h:207:15: note: overridden virtual function is here virtual void UpdateCachedSize(); ^ In file included from ../../../source/ps/GameSetup/GameSetup.cpp:38: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:89:15: warning: 'MouseOverIcon' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual bool MouseOverIcon(); ^ ../../../source/gui/IGUIObject.h:129:15: note: overridden virtual function is here virtual bool MouseOverIcon(); ^ … 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; ^ ==== Building atlas (release) ==== In file included from ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:28: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:67:15: warning: 'HandleMessage' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void HandleMessage(SGUIMessage& Message); ^ ../../../source/gui/IGUIObject.h:291:15: note: overridden virtual function is here virtual void HandleMessage(SGUIMessage& UNUSED(Message)) {} ^ In file included from ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:28: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:72:15: warning: 'UpdateCachedSize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void UpdateCachedSize(); ^ ../../../source/gui/IGUIObject.h:207:15: note: overridden virtual function is here virtual void UpdateCachedSize(); ^ In file included from ../../../source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp:28: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:89:15: warning: 'MouseOverIcon' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual bool MouseOverIcon(); ^ ../../../source/gui/IGUIObject.h:129:15: note: overridden virtual function is here virtual bool MouseOverIcon(); ^ ==== Building gui (release) ==== In file included from ../../../source/pch/gui/precompiled.h:28: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:67:15: warning: 'HandleMessage' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void HandleMessage(SGUIMessage& Message); ^ ../../../source/gui/IGUIObject.h:291:15: note: overridden virtual function is here virtual void HandleMessage(SGUIMessage& UNUSED(Message)) {} ^ In file included from ../../../source/pch/gui/precompiled.h:28: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:72:15: warning: 'UpdateCachedSize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void UpdateCachedSize(); ^ ../../../source/gui/IGUIObject.h:207:15: note: overridden virtual function is here virtual void UpdateCachedSize(); ^ In file included from ../../../source/pch/gui/precompiled.h:28: In file included from ../../../source/gui/GUI.h:51: ../../../source/gui/IGUITextOwner.h:89:15: warning: 'MouseOverIcon' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual bool MouseOverIcon(); ^ ../../../source/gui/IGUIObject.h:129:15: note: overridden virtual function is here virtual bool MouseOverIcon(); ^ ==== Building lowlevel (release) ==== ../../../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/lib/sysdep/os/osx/osx.cpp:91:7: warning: comparison of function 'CGDisplayCopyDisplayMode' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (CGDisplayCopyDisplayMode != NULL) ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ../../../source/lib/sysdep/os/osx/osx.cpp:91:7: note: prefix with the address-of operator to silence this warning if (CGDisplayCopyDisplayMode != NULL) ^ & ../../../source/lib/sysdep/os/osx/osx.cpp:122:7: warning: comparison of function 'CGDisplayCopyDisplayMode' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (CGDisplayCopyDisplayMode != NULL) ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ../../../source/lib/sysdep/os/osx/osx.cpp:122:7: note: prefix with the address-of operator to silence this warning if (CGDisplayCopyDisplayMode != NULL) ^ & … ../../../source/lib/sysdep/os/unix/unix.cpp:66:67: warning: unused parameter 'text' [-Wunused-parameter] static ErrorReactionInternal try_gui_display_error(const wchar_t* text, bool manual_break, bool allow_suppress, bool no_continue) ^ ../../../source/lib/sysdep/os/unix/unix.cpp:66:78: warning: unused parameter 'manual_break' [-Wunused-parameter] static ErrorReactionInternal try_gui_display_error(const wchar_t* text, bool manual_break, bool allow_suppress, bool no_continue) ^ ../../../source/lib/sysdep/os/unix/unix.cpp:66:97: warning: unused parameter 'allow_suppress' [-Wunused-parameter] static ErrorReactionInternal try_gui_display_error(const wchar_t* text, bool manual_break, bool allow_suppress, bool no_continue) ^ ../../../source/lib/sysdep/os/unix/unix.cpp:66:118: warning: unused parameter 'no_continue' [-Wunused-parameter] static ErrorReactionInternal try_gui_display_error(const wchar_t* text, bool manual_break, bool allow_suppress, bool no_continue) ^
Attachments (1)
Change History (16)
comment:1 by , 5 years ago
comment:4 by , 4 years ago
Summary: | Compiler warnings from LLVM 10 on macOS as of r22600 → Compiler warnings as of Aug 2019 (macOS, LLVM 10) |
---|
comment:5 by , 4 years ago
Most of these have been fixed. There's two errors from Aug 2019 that are still in the build for latest trunk today (r23566):
Short version
==== Building engine (release) ==== ../../../source/ps/XML/XeroXMB.h:214:15: warning: private field 'm_Pointer' is not used [-Wunused-private-field] const char* m_Pointer; ^ ../../../source/ps/XML/XeroXMB.h:283:15: warning: private field 'm_Pointer' is not used [-Wunused-private-field] const char* m_Pointer; ==== Building lowlevel (release) ==== ../../../source/lib/sysdep/os/osx/osx.cpp:91:7: warning: comparison of function 'CGDisplayCopyDisplayMode' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (CGDisplayCopyDisplayMode != NULL) ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ../../../source/lib/sysdep/os/osx/osx.cpp:91:7: note: prefix with the address-of operator to silence this warning if (CGDisplayCopyDisplayMode != NULL) ^ & ../../../source/lib/sysdep/os/osx/osx.cpp:122:7: warning: comparison of function 'CGDisplayCopyDisplayMode' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (CGDisplayCopyDisplayMode != NULL) ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ../../../source/lib/sysdep/os/osx/osx.cpp:122:7: note: prefix with the address-of operator to silence this warning if (CGDisplayCopyDisplayMode != NULL) ^ &
comment:6 by , 3 years ago
Owner: | set to |
---|---|
Patch: | → Phab:D3177 |
comment:8 by , 3 years ago
Most of the warnings were fixed. I'm pushing it to A25 as a default ticket for all clang related warnings :)
comment:9 by , 3 years ago
Milestone: | Alpha 24 → Alpha 25 |
---|
comment:10 by , 3 years ago
../../../source/ps/XMB/XMBStorage.cpp:132:42: warning: loop variable 'n' has type 'const std::pair<std::string, int> &' (aka 'const pair<basic_string<char>, int> &') but is initialized with type 'const std::pair<const std::__cxx11::basic_string<char>, int>' resulting in a copy [-Wrange-loop-construct] for (const std::pair<std::string, int>& n : names) ^ ../../../source/ps/XMB/XMBStorage.cpp:132:7: note: use non-reference type 'std::pair<std::string, int>' (aka 'pair<basic_string<char>, int>') to keep the copy or type 'const std::pair<const std::__cxx11::basic_string<char>, int> &' to prevent copying for (const std::pair<std::string, int>& n : names) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/ps/XMB/XMBStorage.cpp:184:41: warning: loop variable 'attr' of type 'const std::pair<u32, std::string>' (aka 'const pair<unsigned int, basic_string<char> >') creates a copy from type 'const std::pair<u32, std::string>' [-Wrange-loop-construct] for (const std::pair<u32, std::string> attr : data.m_Attributes) ^ ../../../source/ps/XMB/XMBStorage.cpp:184:7: note: use reference type 'const std::pair<u32, std::string> &' (aka 'const pair<unsigned int, basic_string<char> > &') to prevent copying for (const std::pair<u32, std::string> attr : data.m_Attributes) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ & 2 warnings generated. ../../../source/renderer/TerrainRenderer.cpp:396:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] m->fancyWaterShader = g_Renderer.GetShaderManager().LoadProgram("glsl/water_high", defines); ^ ../../../source/renderer/TerrainRenderer.cpp:389:3: note: previous statement is here if (WaterMgr->m_WaterReflection) ^ 1 warning generated. In file included from ../../../source/pch/gui/precompiled.h:27: In file included from ../../../source/gui/ObjectBases/IGUIObject.h:29: ../../../source/gui/SettingTypes/CGUIHotkey.h:37:2: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted] MOVABLE(CGUIHotkey); ^ ../../../source/lib/code_annotation.h:237:13: note: expanded from macro 'MOVABLE' className& operator=(className&&) = default ^ ../../../source/gui/SettingTypes/CGUIHotkey.h:31:20: note: move assignment operator of 'CGUIHotkey' is implicitly deleted because base class 'CGUISimpleSetting<CStr8>' has a deleted move assignment operator class CGUIHotkey : public CGUISimpleSetting<CStr> ^ ../../../source/gui/CGUISetting.h:91:2: note: 'operator=' has been explicitly marked deleted here NONCOPYABLE(CGUISimpleSetting); ^ ../../../source/lib/code_annotation.h:229:13: note: expanded from macro 'NONCOPYABLE' className& operator=(const className&) = delete ^ 1 warning generated. In file included from ../../../source/gui/GUIObjectTypes.cpp:30: ../../../source/gui/ObjectTypes/COList.h:36:2: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted] MOVABLE(COListColumn); ^ ../../../source/lib/code_annotation.h:237:13: note: expanded from macro 'MOVABLE' className& operator=(className&&) = default ^ ../../../source/gui/ObjectTypes/COList.h:41:30: note: move assignment operator of 'COListColumn' is implicitly deleted because field 'm_List' has a deleted move assignment operator CGUISimpleSetting<CGUIList> m_List; ^ ../../../source/gui/CGUISetting.h:91:2: note: 'operator=' has been explicitly marked deleted here NONCOPYABLE(CGUISimpleSetting); ^ ../../../source/lib/code_annotation.h:229:13: note: expanded from macro 'NONCOPYABLE' className& operator=(const className&) = delete ^ 1 warning generated. In file included from ../../../source/gui/ObjectTypes/COList.cpp:20: ../../../source/gui/ObjectTypes/COList.h:36:2: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted] MOVABLE(COListColumn); ^ ../../../source/lib/code_annotation.h:237:13: note: expanded from macro 'MOVABLE' className& operator=(className&&) = default ^ ../../../source/gui/ObjectTypes/COList.h:41:30: note: move assignment operator of 'COListColumn' is implicitly deleted because field 'm_List' has a deleted move assignment operator CGUISimpleSetting<CGUIList> m_List; ^ ../../../source/gui/CGUISetting.h:91:2: note: 'operator=' has been explicitly marked deleted here NONCOPYABLE(CGUISimpleSetting); ^ ../../../source/lib/code_annotation.h:229:13: note: expanded from macro 'NONCOPYABLE' className& operator=(const className&) = delete ^
comment:11 by , 3 years ago
Milestone: | Alpha 25 → Alpha 26 |
---|
comment:13 by , 2 years ago
Milestone: | Alpha 26 → Alpha 27 |
---|
comment:14 by , 2 years ago
Summary: | Compiler warnings as of Aug 2019 (macOS, LLVM 10) → Compiler warnings as of May 2022 (macOS, LLVM 10) |
---|
Note:
See TracTickets
for help on using tickets.
The IGUITextOwner warnings about overrides should be fixed as of r22602.
The glooxwrapper warnings about m_Owned were being worked on as part of r22514 (phab:D2093), but hasn't fixed this warning it seems. There is also phab:D2094 which hasn't landed yet but might fix it once it lands.