WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
139079
Fix -Wc++11-narrowing error in SeccompFilters.cpp
https://bugs.webkit.org/show_bug.cgi?id=139079
Summary
Fix -Wc++11-narrowing error in SeccompFilters.cpp
Csaba Osztrogonác
Reported
2014-11-27 13:12:53 PST
../../Source/WebKit2/Shared/linux/SeccompFilters/SeccompFilters.cpp:71:83: error: non-constant-expression cannot be narrowed from type 'long long' to 'scmp_datum_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing] ((struct scmp_arg_cmp){argNum1, static_cast<scmp_compare>(operator1), data1, 0}), ^~~~~ ../../Source/WebKit2/Shared/linux/SeccompFilters/SeccompFilters.cpp:71:83: note: override this message by inserting an explicit cast ((struct scmp_arg_cmp){argNum1, static_cast<scmp_compare>(operator1), data1, 0}), ^~~~~ static_cast<scmp_datum_t>( ) ../../Source/WebKit2/Shared/linux/SeccompFilters/SeccompFilters.cpp:72:83: error: non-constant-expression cannot be narrowed from type 'long long' to 'scmp_datum_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing] ((struct scmp_arg_cmp){argNum2, static_cast<scmp_compare>(operator2), data2, 0})); ^~~~~ ../../Source/WebKit2/Shared/linux/SeccompFilters/SeccompFilters.cpp:72:83: note: override this message by inserting an explicit cast ((struct scmp_arg_cmp){argNum2, static_cast<scmp_compare>(operator2), data2, 0})); ^~~~~ static_cast<scmp_datum_t>( ) ../../Source/WebKit2/Shared/linux/SeccompFilters/SeccompFilters.cpp:75:83: error: non-constant-expression cannot be narrowed from type 'long long' to 'scmp_datum_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing] ((struct scmp_arg_cmp){argNum1, static_cast<scmp_compare>(operator1), data1, 0})); ^~~~~ ../../Source/WebKit2/Shared/linux/SeccompFilters/SeccompFilters.cpp:75:83: note: override this message by inserting an explicit cast ((struct scmp_arg_cmp){argNum1, static_cast<scmp_compare>(operator1), data1, 0})); ^~~~~ static_cast<scmp_datum_t>( ) 3 errors generated.
Attachments
Patch
(2.91 KB, patch)
2014-11-27 13:22 PST
,
Csaba Osztrogonác
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Csaba Osztrogonác
Comment 1
2014-11-27 13:21:15 PST
seccomp.h: ----------- /** * Argument datum */ typedef uint64_t scmp_datum_t; scmp_datum_t is uint64_t, we should use uint64_t instead of long long to fix the build.
Csaba Osztrogonác
Comment 2
2014-11-27 13:22:00 PST
Created
attachment 242256
[details]
Patch
WebKit Commit Bot
Comment 3
2014-11-28 01:09:23 PST
Comment on
attachment 242256
[details]
Patch Clearing flags on attachment: 242256 Committed
r176558
: <
http://trac.webkit.org/changeset/176558
>
WebKit Commit Bot
Comment 4
2014-11-28 01:09:27 PST
All reviewed patches have been landed. Closing bug.
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