[webkit-reviews] review denied: [Bug 18346] [GTK] Remove build warnings : [Attachment 23204] removing some build warnings to make the build prettier

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 5 19:19:07 PDT 2008


Alp Toker <alp at nuanti.com> has denied Gustavo Noronha Silva <gns at gnome.org>'s
request for review:
Bug 18346: [GTK] Remove build warnings
https://bugs.webkit.org/show_bug.cgi?id=18346

Attachment 23204: removing some build warnings to make the build prettier
https://bugs.webkit.org/attachment.cgi?id=23204&action=edit

------- Additional Comments from Alp Toker <alp at nuanti.com>
>--- 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.


More information about the webkit-reviews mailing list