summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2023-02-05 19:33:15 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2023-02-05 20:05:30 +0100
commitfe1633c15bc5a572ba45b59c7612a3eb352503f2 (patch)
treec801ffc69c11fb20cecf9bf31c25bbdb4118f57d /tests
parent6121633021de361e8769ea53fc68ac812b731eb4 (diff)
downloadvala-fe1633c15bc5a572ba45b59c7612a3eb352503f2.tar.gz
codegen: Cast return value of generic type accessor functions
Found by -Wincompatible-function-pointer-types See https://gitlab.gnome.org/GNOME/vala/issues/1408
Diffstat (limited to 'tests')
-rw-r--r--tests/generics/bug640330.c-expected6
-rw-r--r--tests/objects/interface-async-captured-generic.c-expected6
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/generics/bug640330.c-expected b/tests/generics/bug640330.c-expected
index 4b9d88858..22aafedeb 100644
--- a/tests/generics/bug640330.c-expected
+++ b/tests/generics/bug640330.c-expected
@@ -210,19 +210,19 @@ bar_class_init (BarClass * klass,
static GType
bar_foo_get_g_type (Bar* self)
{
- return self->priv->g_type;
+ return (GType) self->priv->g_type;
}
static GBoxedCopyFunc
bar_foo_get_g_dup_func (Bar* self)
{
- return self->priv->g_dup_func;
+ return (GBoxedCopyFunc) self->priv->g_dup_func;
}
static GDestroyNotify
bar_foo_get_g_destroy_func (Bar* self)
{
- return self->priv->g_destroy_func;
+ return (GDestroyNotify) self->priv->g_destroy_func;
}
static void
diff --git a/tests/objects/interface-async-captured-generic.c-expected b/tests/objects/interface-async-captured-generic.c-expected
index ed43ffed9..ece032b76 100644
--- a/tests/objects/interface-async-captured-generic.c-expected
+++ b/tests/objects/interface-async-captured-generic.c-expected
@@ -223,19 +223,19 @@ foo_class_init (FooClass * klass,
static GType
foo_ifoo_get_g_type (Foo* self)
{
- return G_TYPE_STRING;
+ return (GType) G_TYPE_STRING;
}
static GBoxedCopyFunc
foo_ifoo_get_g_dup_func (Foo* self)
{
- return g_strdup;
+ return (GBoxedCopyFunc) g_strdup;
}
static GDestroyNotify
foo_ifoo_get_g_destroy_func (Foo* self)
{
- return g_free;
+ return (GDestroyNotify) g_free;
}
static void