mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
Merge branch 'fix_more_warnings' into 'master'
Fix more warnings See merge request GNOME/glib!1773
This commit is contained in:
commit
db70edb6ec
@ -1431,6 +1431,7 @@ g_param_type_register_static (const gchar *name,
|
||||
0, /* instance_size */
|
||||
16, /* n_preallocs */
|
||||
NULL, /* instance_init */
|
||||
NULL, /* value_table */
|
||||
};
|
||||
ParamSpecClassInfo *cinfo;
|
||||
|
||||
|
@ -286,7 +286,7 @@ struct _IFaceEntry
|
||||
};
|
||||
|
||||
struct _IFaceEntries {
|
||||
guint offset_index;
|
||||
gsize offset_index;
|
||||
IFaceEntry entry[1];
|
||||
};
|
||||
|
||||
@ -577,7 +577,7 @@ lookup_iface_entry_I (IFaceEntries *entries,
|
||||
TypeNode *iface_node)
|
||||
{
|
||||
guint8 *offsets;
|
||||
guint offset_index;
|
||||
gsize offset_index;
|
||||
IFaceEntry *check;
|
||||
gsize index;
|
||||
IFaceEntry *entry;
|
||||
@ -1280,7 +1280,7 @@ type_data_ref_U (TypeNode *node)
|
||||
|
||||
static gboolean
|
||||
iface_node_has_available_offset_L (TypeNode *iface_node,
|
||||
int offset,
|
||||
gsize offset,
|
||||
int for_index)
|
||||
{
|
||||
guint8 *offsets;
|
||||
@ -1299,27 +1299,29 @@ iface_node_has_available_offset_L (TypeNode *iface_node,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
static gsize
|
||||
find_free_iface_offset_L (IFaceEntries *entries)
|
||||
{
|
||||
IFaceEntry *entry;
|
||||
TypeNode *iface_node;
|
||||
int offset;
|
||||
gsize offset;
|
||||
int i;
|
||||
int n_entries;
|
||||
|
||||
n_entries = IFACE_ENTRIES_N_ENTRIES (entries);
|
||||
offset = -1;
|
||||
offset = 0;
|
||||
do
|
||||
{
|
||||
offset++;
|
||||
for (i = 0; i < n_entries; i++)
|
||||
{
|
||||
entry = &entries->entry[i];
|
||||
iface_node = lookup_type_node_I (entry->iface_type);
|
||||
|
||||
if (!iface_node_has_available_offset_L (iface_node, offset, i))
|
||||
break;
|
||||
{
|
||||
offset++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (i != n_entries);
|
||||
@ -1329,12 +1331,12 @@ find_free_iface_offset_L (IFaceEntries *entries)
|
||||
|
||||
static void
|
||||
iface_node_set_offset_L (TypeNode *iface_node,
|
||||
int offset,
|
||||
gsize offset,
|
||||
int index)
|
||||
{
|
||||
guint8 *offsets, *old_offsets;
|
||||
int new_size, old_size;
|
||||
int i;
|
||||
gsize new_size, old_size;
|
||||
gsize i;
|
||||
|
||||
old_offsets = G_ATOMIC_ARRAY_GET_LOCKED (&iface_node->_prot.offsets, guint8);
|
||||
if (old_offsets == NULL)
|
||||
|
@ -151,6 +151,7 @@ g_type_module_get_type (void)
|
||||
sizeof (GTypeModule),
|
||||
0, /* n_preallocs */
|
||||
NULL, /* instance_init */
|
||||
NULL, /* value_table */
|
||||
};
|
||||
const GInterfaceInfo iface_info = {
|
||||
(GInterfaceInitFunc) g_type_module_iface_init,
|
||||
|
@ -85,9 +85,16 @@ g_type_plugin_get_type (void)
|
||||
if (!type_plugin_type)
|
||||
{
|
||||
const GTypeInfo type_plugin_info = {
|
||||
sizeof (GTypePluginClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
sizeof (GTypePluginClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
0, /* class_init */
|
||||
NULL, /* class_destroy */
|
||||
NULL, /* class_data */
|
||||
0, /* instance_size */
|
||||
0, /* n_preallocs */
|
||||
NULL, /* instance_init */
|
||||
NULL, /* value_table */
|
||||
};
|
||||
|
||||
type_plugin_type = g_type_register_static (G_TYPE_INTERFACE, g_intern_static_string ("GTypePlugin"), &type_plugin_info, 0);
|
||||
|
@ -93,7 +93,8 @@ static GType test_module_get_type (void)
|
||||
NULL,
|
||||
sizeof (TestModule),
|
||||
0,
|
||||
(GInstanceInitFunc)NULL
|
||||
(GInstanceInitFunc)NULL,
|
||||
NULL,
|
||||
};
|
||||
object_type = g_type_register_static (G_TYPE_TYPE_MODULE, "TestModule", &object_info, 0);
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ test_valuearray_basic (void)
|
||||
GValueArray *a2;
|
||||
GValue v = G_VALUE_INIT;
|
||||
GValue *p;
|
||||
gint i;
|
||||
guint i;
|
||||
|
||||
a = g_value_array_new (20);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user