[perl-glib] Fix a few compiler warnings
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-glib] Fix a few compiler warnings
- Date: Sat, 1 Feb 2020 20:04:16 +0000 (UTC)
commit 46ec2c4c732fe78bed46606e3dda316d33ab6baa
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sat Feb 1 21:01:09 2020 +0100
Fix a few compiler warnings
GOption.xs | 9 ++++++++-
GType.xs | 4 +++-
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/GOption.xs b/GOption.xs
index 4c19e62..1f1bf95 100644
--- a/GOption.xs
+++ b/GOption.xs
@@ -147,13 +147,20 @@ gperl_arg_info_table_new (void)
return table;
}
+static void
+free_element (gpointer element, gpointer user_data)
+{
+ PERL_UNUSED_VAR (user_data);
+ g_free (element);
+}
+
static void
gperl_arg_info_table_destroy (GPerlArgInfoTable *table)
{
g_hash_table_destroy (table->scalar_to_info);
/* These are NULL-safe. */
- g_slist_foreach (table->allocated_strings, (GFunc) g_free, NULL);
+ g_slist_foreach (table->allocated_strings, free_element, NULL);
g_slist_free (table->allocated_strings);
g_free (table);
diff --git a/GType.xs b/GType.xs
index b597825..56b5b7e 100644
--- a/GType.xs
+++ b/GType.xs
@@ -1741,7 +1741,7 @@ gperl_type_finalize (GObject * instance)
}
static void
-gperl_type_instance_init (GObject * instance)
+gperl_type_instance_init (GObject * instance, gpointer g_class)
{
/*
* for new objects, this may be the place where the initial
@@ -1755,6 +1755,8 @@ gperl_type_instance_init (GObject * instance)
SV **slot;
g_assert (stash != NULL);
+ PERL_UNUSED_VAR (g_class);
+
/* we need to always create a wrapper, regardless of whether there is
* an INIT_INSTANCE sub. otherwise, the fallback mechanism in
* GType.xs' SET_PROPERTY handler will not have an HV to store the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]