Bug 197087

Summary: narrowing errors with clang-8.0
Product: WebKit Reporter: Khem Raj <raj.khem>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, Hironori.Fujii
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Linux   
Attachments:
Description Flags
proposed fix none

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
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
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.