Bug 231091 - [JSC][32bit] Remove a bunch of compiler warnings
Summary: [JSC][32bit] Remove a bunch of compiler warnings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-01 11:27 PDT by Xan Lopez
Modified: 2021-10-06 02:36 PDT (History)
9 users (show)

See Also:


Attachments
v1 (4.30 KB, patch)
2021-10-01 11:30 PDT, Xan Lopez
clopez: review+
Details | Formatted Diff | Diff
v2 (3.12 KB, patch)
2021-10-06 01:35 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 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.
Comment 1 Xan Lopez 2021-10-01 11:30:18 PDT
Created attachment 439883 [details]
v1
Comment 2 Xan Lopez 2021-10-06 01:35:59 PDT
Created attachment 440346 [details]
v2

patch to land.
Comment 3 EWS 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].
Comment 4 Radar WebKit Bug Importer 2021-10-06 02:36:17 PDT
<rdar://problem/83924827>