CHERI: silence two pedantic warnings

When building for CHERI with additional warning flags, implicitly
converting uintptr_t to an integer type that can't store a pointer
results in a compiler warnings. Silence two of these by adding
explicit casts.
This commit is contained in:
Alex Richardson 2023-09-12 01:26:35 -07:00
parent 403f7a10dc
commit 2787e59a77
2 changed files with 2 additions and 2 deletions

View File

@ -4859,7 +4859,7 @@ g_object_compat_control (gsize what,
{
gpointer *pp;
case 1: /* floating base type */
return G_TYPE_INITIALLY_UNOWNED;
return (gsize) G_TYPE_INITIALLY_UNOWNED;
case 2: /* FIXME: remove this once GLib/Gtk+ break ABI again */
floating_flag_handler = (guint(*)(GObject*,gint)) data;
return 1;

View File

@ -955,7 +955,7 @@ param_spec_pool_hash (gconstpointer key_spec)
{
const GParamSpec *key = key_spec;
const gchar *p;
guint h = key->owner_type;
guint h = (guint) key->owner_type;
for (p = key->name; *p; p++)
h = (h << 5) - h + *p;