A list of warnings from the gtk trunk buildbot: WebKit/gtk/webkit/webkitwebview.cpp:1134: warning: passing 'double' for argument 1 to 'void WebCore::Settings::setDefaultFontSize(int)' WebKit/gtk/webkit/webkitwebview.cpp:1135: warning: passing 'double' for argument 1 to 'void WebCore::Settings::setDefaultFixedFontSize(int)' WebKit/gtk/webkit/webkitwebview.cpp:1136: warning: passing 'double' for argument 1 to 'void WebCore::Settings::setMinimumFontSize(int)' WebKit/gtk/webkit/webkitwebview.cpp:1137: warning: passing 'double' for argument 1 to 'void WebCore::Settings::setMinimumLogicalFontSize(int)' WebCore/platform/gtk/RenderThemeGtk.cpp:165: warning: converting to 'gint' from 'double' WebCore/platform/gtk/RenderThemeGtk.cpp:166: warning: converting to 'gint' from 'double' WebCore/platform/gtk/RenderThemeGtk.cpp:167: warning: passing 'double' for argument 1 to 'WebCore::IntPoint::IntPoint(int, int)' WebCore/platform/gtk/RenderThemeGtk.cpp:167: warning: passing 'double' for argument 2 to 'WebCore::IntPoint::IntPoint(int, int)' WebCore/platform/gtk/ScrollViewGtk.cpp:523: warning: passing 'float' for argument 1 to 'void WebCore::ScrollView::scrollBy(int, int)' WebCore/platform/gtk/ScrollViewGtk.cpp:523: warning: passing 'float' for argument 2 to 'void WebCore::ScrollView::scrollBy(int, int)' WebCore/platform/gtk/gtk2drawing.c:1613: warning: unused variable 'shadow_type' WebCore/platform/gtk/gtk2drawing.c:1828: warning: passing argument 7 of 'gtk_paint_extension' discards qualifiers from pointer target type WebCore/platform/gtk/gtk2drawing.c:1894: warning: passing argument 7 of 'gtk_paint_extension' discards qualifiers from pointer target type WebCore/platform/gtk/gtk2drawing.c:1910: warning: passing argument 7 of 'gtk_paint_box_gap' discards qualifiers from pointer target type WebCore/platform/gtk/gtk2drawing.c:1919: warning: passing argument 7 of 'gtk_paint_extension' discards qualifiers from pointer target type WebCore/platform/gtk/gtk2drawing.c:1935: warning: passing argument 7 of 'gtk_paint_box_gap' discards qualifiers from pointer target type WebCore/platform/gtk/gtk2drawing.c:1962: warning: passing argument 7 of 'gtk_paint_box_gap' discards qualifiers from pointer target type WebCore/platform/gtk/gtk2drawing.c:1972: warning: unused variable 'shadow_type' WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:884: warning: passing 'double' for argument 1 to 'WebCore::IntPoint::IntPoint(int, int)' WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:884: warning: passing 'double' for argument 2 to 'WebCore::IntPoint::IntPoint(int, int)' WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp:98: warning: comparison between signed and unsigned integer expressions WebCore/plugins/gtk/PluginDatabaseGtk.cpp:50: warning: missing sentinel in function call WebCore/plugins/gtk/PluginDatabaseGtk.cpp:61: warning: unused variable 'directory' WebCore/platform/network/curl/ResourceHandleCurl.cpp:81: warning: 'WTF::HashSet<WebCore::String, WebCore::StringHash, WTF::HashTraits<WebCore::String> >& WebCore::allowsAnyHTTPSCertificateHosts()' defined but not used WebCore/platform/network/curl/ResourceHandleManager.cpp:322: warning: unused variable 'err'
Also add warnings in bug #19353 and #19354
New warning in gtkk2drawing.c WebCore/platform/gtk/gtk2drawing.c: In function ‘moz_gtk_toolbar_paint’: WebCore/platform/gtk/gtk2drawing.c:1613: warning: unused variable ‘shadow_type’ WebCore/platform/gtk/gtk2drawing.c: In function ‘moz_gtk_menu_bar_paint’: WebCore/platform/gtk/gtk2drawing.c:1972: warning: unused variable ‘shadow_type’
Warnings from PNGImageDecoder.cpp Decoder.cpp' || echo './'`WebCore/platform/image-decoders/png/PNGImageDecoder.cpp WebCore/platform/image-decoders/png/PNGImageDecoder.cpp: In member function ‘void WebCore::PNGImageDecoder::headerAvailable()’: WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:235: warning: comparison between signed and unsigned integer expressions WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:235: warning: comparison between signed and unsigned integer expressions
Warning in SimpleFontDataGtk.cpp WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp: In member function ‘virtual bool WebCore::SimpleFontData::containsCharacters(const UChar*, int) const’: WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp:98: warning: comparison between signed and unsigned integer expressions
Warnings in VideoSinkGstreamer.cpp WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp:43: warning: deprecated conversion from string constant to ‘gchar*’ WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp:43: warning: deprecated conversion from string constant to ‘gchar*’ WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp:43: warning: deprecated conversion from string constant to ‘gchar*’ WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp:43: warning: deprecated conversion from string constant to ‘gchar*’ WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp: In function ‘gboolean webkit_video_sink_set_caps(GstBaseSink*, GstCaps*)’: WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp:184: warning: comparison between signed and unsigned integer expressions WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp: In function ‘void webkit_video_sink_finalize(GObject*)’: WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp:211: warning: unused variable ‘sink’
I'm not sure this bug report helps a lot; some of these build warnings are history now. Still, I was going to open a bug report to post my patch that does remove some warnings, and thought I'd use this one.
Created attachment 23204 [details] removing some build warnings to make the build prettier some work in cleaning build warnings for GTK+-related stuff
Comment on attachment 23204 [details] removing some build warnings to make the build prettier >--- a/WebCore/page/gtk/AccessibilityObjectWrapperAtk.cpp >+++ b/WebCore/page/gtk/AccessibilityObjectWrapperAtk.cpp >@@ -143,7 +143,7 @@ static AtkObject* webkit_accessible_ref_child(AtkObject* object, gint index) > AccessibilityObject* coreObject = core(object); > > g_return_val_if_fail(index >= 0, NULL); >- g_return_val_if_fail(index < coreObject->children().size(), NULL); >+ g_return_val_if_fail(((size_t)index) < coreObject->children().size(), NULL); > > AccessibilityObject* coreChild = coreObject->children().at(index).get(); > This cast can just be "(size_t)index" without the extra parentheses (or a C++-style cast, even better). >diff --git a/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp b/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp >index 37bb734..2832074 100644 >--- a/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp >+++ b/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp >@@ -103,7 +103,7 @@ bool SimpleFontData::containsCharacters(const UChar* characters, int length) con > PangoCoverage* available = pango_font_get_coverage(m_font.m_font, pango_language_get_default()); > pango_coverage_max(requested, available); > >- for (unsigned i = 0; i < length; i++) { >+ for (unsigned i = 0; i < (unsigned)length; i++) { > if (PANGO_COVERAGE_NONE == pango_coverage_get(requested, i)) { > result = false; > break; This can just be for (int i = 0; i < length; i++) since length is an int. >diff --git a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp >index 8888f2b..00b3057 100644 >--- a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp >+++ b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp >@@ -86,7 +86,7 @@ static const GtkUnicodeMenuEntry bidi_menu_entries[] = { > > static void insertControlCharacter(GtkWidget* widget) > { >- GtkUnicodeMenuEntry* entry = (GtkUnicodeMenuEntry*)g_object_get_data(G_OBJECT(widget), "gtk-unicode-menu-entry"); >+ // GtkUnicodeMenuEntry* entry = (GtkUnicodeMenuEntry*)g_object_get_data(G_OBJECT(widget), "gtk-unicode-menu-entry"); > notImplemented(); > } > Normally we try to avoid commented-out code but in this case it's the only hint as to what's going on and what the author intended, so I'm OK with your change here to fix the warning. Looks good to land after suggested changes.
(In reply to comment #8) > >diff --git a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp > >index 8888f2b..00b3057 100644 > >--- a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp > >+++ b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp > >@@ -86,7 +86,7 @@ static const GtkUnicodeMenuEntry bidi_menu_entries[] = { > > > > static void insertControlCharacter(GtkWidget* widget) > > { > >- GtkUnicodeMenuEntry* entry = (GtkUnicodeMenuEntry*)g_object_get_data(G_OBJECT(widget), "gtk-unicode-menu-entry"); > >+ // GtkUnicodeMenuEntry* entry = (GtkUnicodeMenuEntry*)g_object_get_data(G_OBJECT(widget), "gtk-unicode-menu-entry"); > > notImplemented(); > > } > > > > Normally we try to avoid commented-out code but in this case it's the only hint > as to what's going on and what the author intended, so I'm OK with your change > here to fix the warning. Yeah, that's why I decided to leave it. I also left some static functions which are generating warnings untouched, as they will probably still be called when the missing implementation comes into place. > Looks good to land after suggested changes. Just building webkit again to test that they are correct and will upload a new patch. Thanks for the quick review!
Created attachment 23210 [details] reworked patch
Comment on attachment 23210 [details] reworked patch Thanks for the cleanup.
Landed in r36123. I'd rather look closely at the double/int cast warnings than simply silencing them, so going ahead and closing this bug to clear pending-commit.