Log Message
[GTK] Silence GCC 8 warnings https://bugs.webkit.org/show_bug.cgi?id=185556
Reviewed by Žan Doberšek. Source/WebCore: Silence remaining -Wcast-function-type warnings by casting through void (*)(void), aka GCallback. * accessibility/atk/WebKitAccessibleHyperlink.cpp: (webkitAccessibleHyperlinkSetProperty): (webkitAccessibleHyperlinkGetType): * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetType): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage): Tools: GCC is complaining about this strncpy. It's guaranteed to be safe, because the length of source and destination are always identical. But switching to snprintf avoids the warning. * DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp: (FormValue::NPP_GetValue):
Modified Paths
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp
- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
- trunk/Tools/ChangeLog
- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp
Diff
Modified: trunk/Source/WebCore/ChangeLog (232117 => 232118)
--- trunk/Source/WebCore/ChangeLog 2018-05-23 17:39:03 UTC (rev 232117)
+++ trunk/Source/WebCore/ChangeLog 2018-05-23 17:50:44 UTC (rev 232118)
@@ -1,3 +1,21 @@
+2018-05-23 Michael Catanzaro <[email protected]>
+
+ [GTK] Silence GCC 8 warnings
+ https://bugs.webkit.org/show_bug.cgi?id=185556
+
+ Reviewed by Žan Doberšek.
+
+ Silence remaining -Wcast-function-type warnings by casting through void (*)(void), aka
+ GCallback.
+
+ * accessibility/atk/WebKitAccessibleHyperlink.cpp:
+ (webkitAccessibleHyperlinkSetProperty):
+ (webkitAccessibleHyperlinkGetType):
+ * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+ (webkitAccessibleGetType):
+ * platform/network/soup/NetworkStorageSessionSoup.cpp:
+ (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage):
+
2018-05-23 Zalan Bujtas <[email protected]>
[LFC] Move sizing/positioning logic to helper classes
Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp (232117 => 232118)
--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp 2018-05-23 17:39:03 UTC (rev 232117)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp 2018-05-23 17:50:44 UTC (rev 232118)
@@ -342,7 +342,7 @@
// No need to check and unref previous values of
// priv->hyperlinkImpl as this is a CONSTRUCT ONLY property
priv->hyperlinkImpl = WEBKIT_ACCESSIBLE(g_value_get_object(value));
- g_object_weak_ref(G_OBJECT(priv->hyperlinkImpl), (GWeakNotify)g_object_unref, object);
+ g_object_weak_ref(G_OBJECT(priv->hyperlinkImpl), (GWeakNotify)(GCallback)g_object_unref, object);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec);
@@ -397,17 +397,17 @@
sizeof(WebKitAccessibleHyperlinkClass),
(GBaseInitFunc) 0,
(GBaseFinalizeFunc) 0,
- (GClassInitFunc) webkitAccessibleHyperlinkClassInit,
+ (GClassInitFunc)(GCallback) webkitAccessibleHyperlinkClassInit,
(GClassFinalizeFunc) 0,
0, /* class data */
sizeof(WebKitAccessibleHyperlink), /* instance size */
0, /* nb preallocs */
- (GInstanceInitFunc) webkitAccessibleHyperlinkInit,
+ (GInstanceInitFunc)(GCallback) webkitAccessibleHyperlinkInit,
0 /* value table */
};
static const GInterfaceInfo actionInfo = {
- (GInterfaceInitFunc)(GInterfaceInitFunc)atkActionInterfaceInit,
+ (GInterfaceInitFunc)(GCallback)atkActionInterfaceInit,
(GInterfaceFinalizeFunc) 0, 0
};
Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (232117 => 232118)
--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2018-05-23 17:39:03 UTC (rev 232117)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp 2018-05-23 17:50:44 UTC (rev 232118)
@@ -1177,7 +1177,7 @@
sizeof(WebKitAccessibleClass),
(GBaseInitFunc) 0,
(GBaseFinalizeFunc) 0,
- (GClassInitFunc) webkitAccessibleClassInit,
+ (GClassInitFunc)(GCallback) webkitAccessibleClassInit,
(GClassFinalizeFunc) 0,
0, /* class data */
sizeof(WebKitAccessible), /* instance size */
@@ -1194,20 +1194,20 @@
}
static const GInterfaceInfo AtkInterfacesInitFunctions[] = {
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleActionInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleSelectionInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleEditableTextInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleTextInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleComponentInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleImageInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleTableInterfaceInit), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleActionInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleSelectionInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleEditableTextInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTextInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleComponentInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleImageInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTableInterfaceInit)), 0, 0},
#if ATK_CHECK_VERSION(2,11,90)
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleTableCellInterfaceInit), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTableCellInterfaceInit)), 0, 0},
#endif
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleHypertextInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleHyperlinkImplInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleDocumentInterfaceInit), 0, 0},
- {reinterpret_cast<GInterfaceInitFunc>(webkitAccessibleValueInterfaceInit), 0, 0}
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleHypertextInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleHyperlinkImplInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleDocumentInterfaceInit)), 0, 0},
+ {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleValueInterfaceInit)), 0, 0}
};
enum WAIType {
Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (232117 => 232118)
--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2018-05-23 17:39:03 UTC (rev 232117)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2018-05-23 17:50:44 UTC (rev 232118)
@@ -237,7 +237,7 @@
}
GRefPtr<SecretItem> secretItem = static_cast<SecretItem*>(elements->data);
- g_list_foreach(elements.get(), reinterpret_cast<GFunc>(g_object_unref), nullptr);
+ g_list_foreach(elements.get(), reinterpret_cast<GFunc>(reinterpret_cast<GCallback>(g_object_unref)), nullptr);
GRefPtr<GHashTable> attributes = adoptGRef(secret_item_get_attributes(secretItem.get()));
String user = String::fromUTF8(static_cast<const char*>(g_hash_table_lookup(attributes.get(), "user")));
if (user.isEmpty()) {
Modified: trunk/Tools/ChangeLog (232117 => 232118)
--- trunk/Tools/ChangeLog 2018-05-23 17:39:03 UTC (rev 232117)
+++ trunk/Tools/ChangeLog 2018-05-23 17:50:44 UTC (rev 232118)
@@ -1,3 +1,16 @@
+2018-05-23 Michael Catanzaro <[email protected]>
+
+ [GTK] Silence GCC 8 warnings
+ https://bugs.webkit.org/show_bug.cgi?id=185556
+
+ Reviewed by Žan Doberšek.
+
+ GCC is complaining about this strncpy. It's guaranteed to be safe, because the length of
+ source and destination are always identical. But switching to snprintf avoids the warning.
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp:
+ (FormValue::NPP_GetValue):
+
2018-05-23 Ryan Haddad <[email protected]>
Unreviewed, rolling out r232112.
Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp (232117 => 232118)
--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp 2018-05-23 17:39:03 UTC (rev 232117)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp 2018-05-23 17:50:44 UTC (rev 232118)
@@ -44,7 +44,7 @@
*((void**)value) = browser->memalloc(sizeof(formValueText));
if (!*((void**)value))
return NPERR_OUT_OF_MEMORY_ERROR;
- strncpy(*((char**)value), formValueText, sizeof(formValueText));
+ snprintf(*((char**)value), sizeof(formValueText), "%s", formValueText);
return NPERR_NO_ERROR;
}
return NPERR_GENERIC_ERROR;
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
