mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-28 15:06:15 +01:00
Merge branch 'cheri-int-cast-warning-fix' into 'main'
Fixes for integer cast warnings when targeting CHERI See merge request GNOME/glib!3579
This commit is contained in:
commit
1f9aafe5d5
@ -952,7 +952,7 @@
|
||||
/* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT
|
||||
*/
|
||||
#define GPOINTER_TO_SIZE(p) ((gsize) (p))
|
||||
#define GSIZE_TO_POINTER(s) ((gpointer) (gsize) (s))
|
||||
#define GSIZE_TO_POINTER(s) ((gpointer) (guintptr) (gsize) (s))
|
||||
|
||||
/* Provide convenience macros for handling structure
|
||||
* fields through their offsets.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user