RESOLVED FIXED 231091
[JSC][32bit] Remove a bunch of compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=231091
Summary [JSC][32bit] Remove a bunch of compiler warnings
Xan Lopez
Reported 2021-10-01 11:27:02 PDT
+ cmake --build /home/igalia/xlopez/WebKit/WebKitBuild/Debug --config Debug -- jsc testb3 testair testapi testmasm testdfg -j32 [658/1694] Building C object Source/ThirdParty/capstone/CMakeFiles/capstone.dir/Source/cs.c.o ../../Source/ThirdParty/capstone/Source/cs.c: In function 'cs_disasm': ../../Source/ThirdParty/capstone/Source/cs.c:1015:26: warning: cast increases required alignment of target type [-Wcast-align] 1015 | insn_cache = (cs_insn *)((char *)total + sizeof(cs_insn) * c); | ^ [864/1694] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f0a787a9-3.cpp.o In file included from JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f0a787a9-3.cpp:6: ../../Source/JavaScriptCore/bytecode/CodeBlock.cpp: In member function 'bool JSC::CodeBlock::isConstantOwnedByUnlinkedCodeBlock(JSC::VirtualRegister) const': ../../Source/JavaScriptCore/bytecode/CodeBlock.cpp:953:1: warning: control reaches end of non-void function [-Wreturn-type] 953 | } | ^ [867/1694] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-bfc896e1-11.cpp.o In file included from JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-bfc896e1-11.cpp:4: ../../Source/JavaScriptCore/dfg/DFGOSRExit.cpp: In static member function 'static void JSC::DFG::OSRExit::compileExit(JSC::CCallHelpers&, JSC::VM&, const JSC::DFG::OSRExit&, const JSC::Operands<JSC::ValueRecovery>&, JSC::DFG::SpeculationRecovery*)': ../../Source/JavaScriptCore/dfg/DFGOSRExit.cpp:566:12: warning: variable 'firstTmpToRestoreEarly' set but not used [-Wunused-but-set-variable] 566 | size_t firstTmpToRestoreEarly = operands.size() - operands.numberOfTmps(); | ^~~~~~~~~~~~~~~~~~~~~~ [924/1694] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-3a3c4ec0-5.cpp.o In file included from JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-3a3c4ec0-5.cpp:7: ../../Source/JavaScriptCore/jit/JITOpcodes32_64.cpp: In member function 'void JSC::JIT::emit_op_enter(const JSC::Instruction*)': ../../Source/JavaScriptCore/jit/JITOpcodes32_64.cpp:1096:81: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 1096 | for (int i = CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters(); i < m_profiledCodeBlock->numVars(); ++i) | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [971/1694] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/dfg/DFGSpeculativeJIT.cpp.o ../../Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: In member function 'void JSC::DFG::SpeculativeJIT::speculateNumber(JSC::DFG::Edge)': ../../Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:11272:37: warning: comparison between types 'JSC::JSValue::<unnamed enum>' and 'JSC::JSValue::<unnamed enum>' [-Wsign-compare] 11272 | static_assert(JSValue::Int32Tag >= JSValue::LowestTag, "Int32Tag is included in >= JSValue::LowestTag range."); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ ../../Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: In member function 'void JSC::DFG::SpeculativeJIT::speculateMisc(JSC::DFG::Edge, JSC::JSValueRegs)': ../../Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:11919:37: warning: comparison between types 'JSC::JSValue::<unnamed enum>' and 'JSC::JSValue::<unnamed enum>' [-Wsign-compare] 11919 | static_assert(JSValue::Int32Tag >= JSValue::UndefinedTag, "Int32Tag is included in >= JSValue::UndefinedTag range."); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ [1694/1694] Linking CXX executable bin/testmasm The one about Int32Tag is not trivial, so I'll let it be. Patch incoming for the rest.
Attachments
v1 (4.30 KB, patch)
2021-10-01 11:30 PDT, Xan Lopez
clopez: review+
v2 (3.12 KB, patch)
2021-10-06 01:35 PDT, Xan Lopez
no flags
Xan Lopez
Comment 1 2021-10-01 11:30:18 PDT
Xan Lopez
Comment 2 2021-10-06 01:35:59 PDT
Created attachment 440346 [details] v2 patch to land.
EWS
Comment 3 2021-10-06 02:35:25 PDT
Committed r283608 (242560@main): <https://commits.webkit.org/242560@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 440346 [details].
Radar WebKit Bug Importer
Comment 4 2021-10-06 02:36:17 PDT
Note You need to log in before you can comment on or make changes to this bug.