WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178899
[WPE] Fix build warnings
https://bugs.webkit.org/show_bug.cgi?id=178899
Summary
[WPE] Fix build warnings
Michael Catanzaro
Reported
2017-10-26 16:58:55 PDT
I expect WPE to build with zero warnings on the compiler I happen to be using (currently GCC 7.2.1). It'd be great if other developers would ensure the same is true with their compilers of choice, but I'll just worry about mine. Normally I would create separate bugs for different warnings, but since it's a lot, I think it would be easiest to handle it in one bug for this first batch.
Attachments
Patch
(19.08 KB, patch)
2017-10-26 20:01 PDT
,
Michael Catanzaro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2017-10-26 17:01:09 PDT
Forgot to paste the warnings that I see: [683/2352] Building CXX object Source/WebCore/CMake...ebCore.dir/html/canvas/WebGL2RenderingContext.cpp.o ../../Source/WebCore/html/canvas/WebGL2RenderingContext.cpp: In function ‘std::optional<unsigned int> WebCore::arrayBufferViewElementSize(const JSC::ArrayBufferView&)’: ../../Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:108:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ [738/2352] Building CXX object Source/WebCore/CMake...re.dir/platform/graphics/cairo/CairoUtilities.cpp.o In file included from ../../Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp:49:0: ../DependenciesWPE/Root/include/cairo/cairo-gl.h:65:5: warning: "CAIRO_HAS_GL_SURFACE" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV2_SURFACE ^~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:95:5: warning: "CAIRO_HAS_GLX_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GLX_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:113:5: warning: "CAIRO_HAS_WGL_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_WGL_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ [768/2352] Building CXX object Source/WebCore/CMake....dir/platform/graphics/cairo/ImageBufferCairo.cpp.o In file included from ../../Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp:57:0: ../DependenciesWPE/Root/include/cairo/cairo-gl.h:65:5: warning: "CAIRO_HAS_GL_SURFACE" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV2_SURFACE ^~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:95:5: warning: "CAIRO_HAS_GLX_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GLX_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:113:5: warning: "CAIRO_HAS_WGL_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_WGL_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ [796/2352] Building CXX object Source/WebCore/CMake...ics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.o In file included from ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:116:0: ../DependenciesWPE/Root/include/cairo/cairo-gl.h:65:5: warning: "CAIRO_HAS_GL_SURFACE" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV2_SURFACE ^~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:95:5: warning: "CAIRO_HAS_GLX_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GLX_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:113:5: warning: "CAIRO_HAS_WGL_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_WGL_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ [836/2352] Building CXX object Source/WebCore/CMake...rm/graphics/texmap/TextureMapperShaderProgram.cpp.o ../../Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp: In static member function ‘static WTF::Ref<WebCore::TextureMapperShaderProgram> WebCore::TextureMapperShaderProgram::create(WebCore::TextureMapperShaderProgram::Options)’: ../../Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:379:14: warning: unused variable ‘glVersion’ [-Wunused-variable] unsigned glVersion = GLContext::current()->version(); ^~~~~~~~~ ../../Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp: At global scope: ../../Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:189:20: warning: ‘WebCore::fragmentTemplateGE320Vars’ defined but not used [-Wunused-variable] static const char* fragmentTemplateGE320Vars = ^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:72:20: warning: ‘WebCore::vertexTemplateGE320Vars’ defined but not used [-Wunused-variable] static const char* vertexTemplateGE320Vars = ^~~~~~~~~~~~~~~~~~~~~~~ [866/2352] Building CXX object Source/WebCore/CMake...ebCore.dir/platform/graphics/egl/GLContextEGL.cpp.o In file included from ../../Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:52:0: ../DependenciesWPE/Root/include/cairo/cairo-gl.h:65:5: warning: "CAIRO_HAS_GL_SURFACE" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV2_SURFACE ^~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:95:5: warning: "CAIRO_HAS_GLX_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_GLX_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/cairo/cairo-gl.h:113:5: warning: "CAIRO_HAS_WGL_FUNCTIONS" is not defined, evaluates to 0 [-Wundef] #if CAIRO_HAS_WGL_FUNCTIONS ^~~~~~~~~~~~~~~~~~~~~~~ [891/2352] Building CXX object Source/WebCore/CMake....dir/platform/network/soup/SoupNetworkSession.cpp.o ../../Source/WebCore/platform/network/soup/SoupNetworkSession.cpp: In constructor ‘WebCore::SoupNetworkSession::SoupNetworkSession(PAL::SessionID, SoupCookieJar*)’: ../../Source/WebCore/platform/network/soup/SoupNetworkSession.cpp:116:55: warning: unused parameter ‘sessionID’ [-Wunused-parameter] SoupNetworkSession::SoupNetworkSession(PAL::SessionID sessionID, SoupCookieJar* cookieJar) ^~~~~~~~~ [1476/2352] Building CXX object Tools/TestWebKitAPI...UIClient.dir/__/Tests/WebKitGLib/TestUIClient.cpp.o ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: In function ‘void testWebViewJavaScriptDialogs(UIClientTest*, gconstpointer)’: ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:556:24: warning: unused variable ‘htmlOnBeforeUnloadFormat’ [-Wunused-variable] static const char* htmlOnBeforeUnloadFormat = ^~~~~~~~~~~~~~~~~~~~~~~~ ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: At global scope: ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:556:24: warning: ‘htmlOnBeforeUnloadFormat’ defined but not used [-Wunused-variable] [2007/2352] Building CXX object Source/WebKit/CMake...ir/UIProcess/API/glib/WebKitPermissionRequest.cpp.o In file included from ../DependenciesWPE/Root/include/glib-2.0/gobject/gobject.h:24:0, from ../DependenciesWPE/Root/include/glib-2.0/gobject/gbinding.h:29, from ../DependenciesWPE/Root/include/glib-2.0/glib-object.h:23, from ../../Source/WebKit/UIProcess/API/wpe/WebKitPermissionRequest.h:27, from ../../Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.cpp:21: ../../Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.cpp: In function ‘GType webkit_permission_request_get_type()’: ../DependenciesWPE/Root/include/glib-2.0/gobject/gtype.h:219:50: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/glib-2.0/gobject/gtype.h:1987:11: note: in definition of macro ‘_G_DEFINE_INTERFACE_EXTENDED_BEGIN’ if (TYPE_PREREQ) \ ^~~~~~~~~~~ ../DependenciesWPE/Root/include/glib-2.0/gobject/gtype.h:1748:47: note: in expansion of macro ‘G_DEFINE_INTERFACE_WITH_CODE’ #define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.cpp:38:1: note: in expansion of macro ‘G_DEFINE_INTERFACE’ G_DEFINE_INTERFACE(WebKitPermissionRequest, webkit_permission_request, G_TYPE_OBJECT) ^~~~~~~~~~~~~~~~~~ ../DependenciesWPE/Root/include/glib-2.0/gobject/gtype.h:178:25: note: in expansion of macro ‘G_TYPE_MAKE_FUNDAMENTAL’ #define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) ^~~~~~~~~~~~~~~~~~~~~~~ ../../Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.cpp:38:72: note: in expansion of macro ‘G_TYPE_OBJECT’ G_DEFINE_INTERFACE(WebKitPermissionRequest, webkit_permission_request, G_TYPE_OBJECT) ^~~~~~~~~~~~~ [2191/2352] Building CXX object Tools/WebKitTestRun.../WebKitTestRunner.dir/wpe/HeadlessViewBackend.cpp.o ../../Tools/WebKitTestRunner/wpe/HeadlessViewBackend.cpp: In lambda function: ../../Tools/WebKitTestRunner/wpe/HeadlessViewBackend.cpp:240:18: warning: unused variable ‘handle’ [-Wunused-variable] uint32_t handle = it->first; ^~~~~~ [2208/2352] Building CXX object Tools/WebKitTestRun...es/WebKitTestRunner.dir/wpe/TestControllerWPE.cpp.o ../../Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp:61:22: warning: ‘GMainContext* WTR::threadDefaultContext()’ defined but not used [-Wunused-function] static GMainContext* threadDefaultContext() ^~~~~~~~~~~~~~~~~~~~ [2211/2352] Building CXX object Tools/TestWebKitAPI...gs.dir/__/Tests/WebKitGLib/TestWebKitSettings.cpp.o ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:313:16: warning: ‘WTF::CString convertWebViewMainResourceDataToCString(WebViewTest*)’ defined but not used [-Wunused-function] static CString convertWebViewMainResourceDataToCString(WebViewTest* test) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [2225/2352] Building CXX object Tools/TestWebKitAPI...ons.dir/__/Tests/WebKitGLib/TestWebExtensions.cpp.o ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:33:13: warning: ‘void testWebExtensionGetTitle(WebViewTest*, gconstpointer)’ defined but not used [-Wunused-function] static void testWebExtensionGetTitle(WebViewTest* test, gconstpointer) ^~~~~~~~~~~~~~~~~~~~~~~~ [2236/2352] Building CXX object Tools/TestWebKitAPI...wnloads.dir/__/Tests/WebKitGLib/TestDownloads.cpp.o ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:730:13: warning: ‘void testBlobDownload(WebViewDownloadTest*, gconstpointer)’ defined but not used [-Wunused-function] static void testBlobDownload(WebViewDownloadTest* test, gconstpointer) ^~~~~~~~~~~~~~~~ [2258/2352] Building CXX object Tools/TestWebKitAPI...sources.dir/__/Tests/WebKitGLib/TestResources.cpp.o ../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:731:13: warning: ‘void testWebViewSyncRequestOnMaxConns(SyncRequestOnMaxConnsTest*, gconstpointer)’ defined but not used [-Wunused-function] static void testWebViewSyncRequestOnMaxConns(SyncRequestOnMaxConnsTest* test, gconstpointer)
Michael Catanzaro
Comment 2
2017-10-26 20:01:38 PDT
Created
attachment 325104
[details]
Patch
WebKit Commit Bot
Comment 3
2017-10-30 11:21:06 PDT
Comment on
attachment 325104
[details]
Patch Clearing flags on attachment: 325104 Committed
r224192
: <
https://trac.webkit.org/changeset/224192
>
WebKit Commit Bot
Comment 4
2017-10-30 11:21:07 PDT
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