WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
254828
[GTK] AcceleratedSurfaceDMABuf.cpp does not build on i386
https://bugs.webkit.org/show_bug.cgi?id=254828
Summary
[GTK] AcceleratedSurfaceDMABuf.cpp does not build on i386
Michael Catanzaro
Reported
2023-03-31 10:21:26 PDT
In file included from /buildstream/gnome/sdk/webkitgtk-6.0.bst/_builddir/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-29.cpp:2: /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:133:20: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] EGL_WIDTH, gbm_bo_get_width(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:133:20: note: insert an explicit cast to silence this issue EGL_WIDTH, gbm_bo_get_width(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:134:21: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] EGL_HEIGHT, gbm_bo_get_height(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:134:21: note: insert an explicit cast to silence this issue EGL_HEIGHT, gbm_bo_get_height(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:135:35: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] EGL_LINUX_DRM_FOURCC_EXT, gbm_bo_get_format(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:135:35: note: insert an explicit cast to silence this issue EGL_LINUX_DRM_FOURCC_EXT, gbm_bo_get_format(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:137:40: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] EGL_DMA_BUF_PLANE0_OFFSET_EXT, gbm_bo_get_offset(backObject, 0), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:137:40: note: insert an explicit cast to silence this issue EGL_DMA_BUF_PLANE0_OFFSET_EXT, gbm_bo_get_offset(backObject, 0), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:138:39: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] EGL_DMA_BUF_PLANE0_PITCH_EXT, gbm_bo_get_stride(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:138:39: note: insert an explicit cast to silence this issue EGL_DMA_BUF_PLANE0_PITCH_EXT, gbm_bo_get_stride(backObject), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) 5 errors generated.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2023-03-31 10:57:26 PDT
I guess it's safe to cast these to EGLAttrib because surfaces with size that would overflow an int would be outrageous.
Michael Catanzaro
Comment 2
2023-03-31 11:24:23 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/12250
EWS
Comment 3
2023-04-01 07:26:33 PDT
Committed
262476@main
(f8991bed5a03): <
https://commits.webkit.org/262476@main
> Reviewed commits have been landed. Closing PR #12250 and removing active labels.
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