[Webkit-unassigned] [Bug 218443] New: [JSC] Remove compiler warning in LLIntData.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 2 06:32:33 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=218443

            Bug ID: 218443
           Summary: [JSC] Remove compiler warning in LLIntData.cpp
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: xan.lopez at gmail.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201102/df74157a/attachment.htm>


More information about the webkit-unassigned mailing list