Bug 214298 - [JSC] Remove compiler warning in JSBigInt
Summary: [JSC] Remove compiler warning in JSBigInt
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: 2020-07-14 02:27 PDT by Xan Lopez
Modified: 2020-07-14 09:56 PDT (History)
9 users (show)

See Also:


Attachments
Remove warning in JSBigInt (1.88 KB, patch)
2020-07-14 02:29 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 2020-07-14 02:27:59 PDT
We are ASSERTing >= 0 with an unsigned int, which is redundant. This has been around for a while.

[120/188] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore...DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-17.cpp.o
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/runtime/JSAsyncGenerator.cpp:26,
                 from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-17.cpp:1:
../../Source/JavaScriptCore/runtime/JSBigInt.cpp: In instantiation of ‘static JSC::JSValue JSC::JSBigInt::parseInt(JSC::JSGlobalObject*, JSC::VM&, CharType*, unsigned int, unsigned int, unsigned int, JSC::JSBigInt::ErrorParseMode, JSC::JSBigInt::ParseIntSign, JSC::JSBigInt::ParseIntMode) [with CharType = const unsigned char]’:
../../Source/JavaScriptCore/runtime/JSBigInt.cpp:329:145:   required from here
../../Source/JavaScriptCore/runtime/JSBigInt.cpp:2422:19: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
 2422 |     ASSERT(length >= 0);
DerivedSources/ForwardingHeaders/wtf/Assertions.h:346:11: note: in definition of macro ‘ASSERT’
  346 |     if (!(assertion)) { \
      |           ^~~~~~~~~
Comment 1 Xan Lopez 2020-07-14 02:29:21 PDT
Created attachment 404217 [details]
Remove warning in JSBigInt

Remove warning.
Comment 2 EWS 2020-07-14 09:55:26 PDT
Committed r264346: <https://trac.webkit.org/changeset/264346>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404217 [details].
Comment 3 Radar WebKit Bug Importer 2020-07-14 09:56:19 PDT
<rdar://problem/65548727>