RESOLVED FIXED218443
[JSC] Remove compiler warning in LLIntData.cpp
https://bugs.webkit.org/show_bug.cgi?id=218443
Summary [JSC] Remove compiler warning in LLIntData.cpp
Xan Lopez
Reported 2020-11-02 06:32:33 PST
This warning has been around in my machine for a while: In file included from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:32, from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:26, from ../../Source/JavaScriptCore/config.h:38, from ../../Source/JavaScriptCore/llint/LLIntCLoop.cpp:26, from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-6e4525b9-1.cpp:1: ../../Source/JavaScriptCore/llint/LLIntData.cpp: In static member function ‘static void JSC::LLInt::Data::performAssertions(JSC::VM&)’: ../../Source/JavaScriptCore/llint/LLIntData.cpp:100:88: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare] 100 | ASSERT(static_cast<long unsigned int>(CallFrameSlot::codeBlock * sizeof(Register)) == CallFrame::returnPCOffset() + MachineRegisterSize); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/Assertions.h:346:11: note: in definition of macro ‘ASSERT’ 346 | if (!(assertion)) { \ | ^~~~~~~~~ This seems fixable by casting the scoped enum used in this comparison (CallFrameSlot) to its underlying type, which seems advised in this kind of operation anyway. Also while at it I removed the type annotation for the enum, since we are using the default.
Attachments
Remove warning from LLIntData (3.65 KB, patch)
2020-11-02 06:40 PST, Xan Lopez
no flags
Xan Lopez
Comment 1 2020-11-02 06:40:35 PST
Created attachment 412915 [details] Remove warning from LLIntData v1
Radar WebKit Bug Importer
Comment 2 2020-11-02 10:07:15 PST
Mark Lam
Comment 3 2020-11-02 10:19:15 PST
Comment on attachment 412915 [details] Remove warning from LLIntData r=me
EWS
Comment 4 2020-11-02 10:35:24 PST
Committed r269252: <https://trac.webkit.org/changeset/269252> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412915 [details].
Note You need to log in before you can comment on or make changes to this bug.