WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
197087
narrowing errors with clang-8.0
https://bugs.webkit.org/show_bug.cgi?id=197087
Summary
narrowing errors with clang-8.0
Khem Raj
Reported
2019-04-18 18:43:03 PDT
Following error is reported by clang on arm In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-5037b3e8-3.cpp:2: /mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/webkitgtk/2.24.0-r0/webkitgtk-2.24.0/Source/WebCore/contentextensions/NFAToDFA.cpp:352:43: error: non-constant-expression cannot be narrowed from type 'char' to 'signed char' in initializer list [-Wc++11-narrowing] dfa.transitionRanges.append({ range.first, range.last }); ^~~~~~~~~~~ /mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/webkitgtk/2.24.0-r0/webkitgtk-2.24.0/Source/WebCore/contentextensions/NFAToDFA.cpp:352:43: note: insert an explicit cast to silence this issue dfa.transitionRanges.append({ range.first, range.last }); ^~~~~~~~~~~ static_cast<signed char>( ) /mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/webkitgtk/2.24.0-r0/webkitgtk-2.24.0/Source/WebCore/contentextensions/NFAToDFA.cpp:352:56: error: non-constant-expression cannot be narrowed from type 'char' to 'signed char' in initializer list [-Wc++11-narrowing] dfa.transitionRanges.append({ range.first, range.last }); ^~~~~~~~~~ /mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/webkitgtk/2.24.0-r0/webkitgtk-2.24.0/Source/WebCore/contentextensions/NFAToDFA.cpp:352:56: note: insert an explicit cast to silence this issue dfa.transitionRanges.append({ range.first, range.last }); ^~~~~~~~~~ static_cast<signed char>( ) 2 errors generated.
Attachments
proposed fix
(1.18 KB, patch)
2019-04-18 18:44 PDT
,
Khem Raj
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Khem Raj
Comment 1
2019-04-18 18:44:05 PDT
Created
attachment 367781
[details]
proposed fix
Fujii Hironori
Comment 2
2019-04-18 23:28:47 PDT
Did you read this?
https://webkit.org/contributing-code/
Ahmad Saleem
Comment 3
2023-09-08 15:38:33 PDT
https://github.com/WebKit/WebKit/blob/256590954964b0f4ead4ad3aa3289bb97bc1f5c4/Source/WebCore/contentextensions/NFAToDFA.cpp#L349
^ Do we need this or we do even have clang 8 supported or we moved to newer version and don't need this?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug