mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +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 */
|
0, /* instance_size */
|
||||||
16, /* n_preallocs */
|
16, /* n_preallocs */
|
||||||
NULL, /* instance_init */
|
NULL, /* instance_init */
|
||||||
|
NULL, /* value_table */
|
||||||
};
|
};
|
||||||
ParamSpecClassInfo *cinfo;
|
ParamSpecClassInfo *cinfo;
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ struct _IFaceEntry
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct _IFaceEntries {
|
struct _IFaceEntries {
|
||||||
guint offset_index;
|
gsize offset_index;
|
||||||
IFaceEntry entry[1];
|
IFaceEntry entry[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -577,7 +577,7 @@ lookup_iface_entry_I (IFaceEntries *entries,
|
|||||||
TypeNode *iface_node)
|
TypeNode *iface_node)
|
||||||
{
|
{
|
||||||
guint8 *offsets;
|
guint8 *offsets;
|
||||||
guint offset_index;
|
gsize offset_index;
|
||||||
IFaceEntry *check;
|
IFaceEntry *check;
|
||||||
gsize index;
|
gsize index;
|
||||||
IFaceEntry *entry;
|
IFaceEntry *entry;
|
||||||
@ -1280,7 +1280,7 @@ type_data_ref_U (TypeNode *node)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
iface_node_has_available_offset_L (TypeNode *iface_node,
|
iface_node_has_available_offset_L (TypeNode *iface_node,
|
||||||
int offset,
|
gsize offset,
|
||||||
int for_index)
|
int for_index)
|
||||||
{
|
{
|
||||||
guint8 *offsets;
|
guint8 *offsets;
|
||||||
@ -1299,27 +1299,29 @@ iface_node_has_available_offset_L (TypeNode *iface_node,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gsize
|
||||||
find_free_iface_offset_L (IFaceEntries *entries)
|
find_free_iface_offset_L (IFaceEntries *entries)
|
||||||
{
|
{
|
||||||
IFaceEntry *entry;
|
IFaceEntry *entry;
|
||||||
TypeNode *iface_node;
|
TypeNode *iface_node;
|
||||||
int offset;
|
gsize offset;
|
||||||
int i;
|
int i;
|
||||||
int n_entries;
|
int n_entries;
|
||||||
|
|
||||||
n_entries = IFACE_ENTRIES_N_ENTRIES (entries);
|
n_entries = IFACE_ENTRIES_N_ENTRIES (entries);
|
||||||
offset = -1;
|
offset = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
offset++;
|
|
||||||
for (i = 0; i < n_entries; i++)
|
for (i = 0; i < n_entries; i++)
|
||||||
{
|
{
|
||||||
entry = &entries->entry[i];
|
entry = &entries->entry[i];
|
||||||
iface_node = lookup_type_node_I (entry->iface_type);
|
iface_node = lookup_type_node_I (entry->iface_type);
|
||||||
|
|
||||||
if (!iface_node_has_available_offset_L (iface_node, offset, i))
|
if (!iface_node_has_available_offset_L (iface_node, offset, i))
|
||||||
break;
|
{
|
||||||
|
offset++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (i != n_entries);
|
while (i != n_entries);
|
||||||
@ -1329,12 +1331,12 @@ find_free_iface_offset_L (IFaceEntries *entries)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
iface_node_set_offset_L (TypeNode *iface_node,
|
iface_node_set_offset_L (TypeNode *iface_node,
|
||||||
int offset,
|
gsize offset,
|
||||||
int index)
|
int index)
|
||||||
{
|
{
|
||||||
guint8 *offsets, *old_offsets;
|
guint8 *offsets, *old_offsets;
|
||||||
int new_size, old_size;
|
gsize new_size, old_size;
|
||||||
int i;
|
gsize i;
|
||||||
|
|
||||||
old_offsets = G_ATOMIC_ARRAY_GET_LOCKED (&iface_node->_prot.offsets, guint8);
|
old_offsets = G_ATOMIC_ARRAY_GET_LOCKED (&iface_node->_prot.offsets, guint8);
|
||||||
if (old_offsets == NULL)
|
if (old_offsets == NULL)
|
||||||
|
@ -151,6 +151,7 @@ g_type_module_get_type (void)
|
|||||||
sizeof (GTypeModule),
|
sizeof (GTypeModule),
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
NULL, /* instance_init */
|
NULL, /* instance_init */
|
||||||
|
NULL, /* value_table */
|
||||||
};
|
};
|
||||||
const GInterfaceInfo iface_info = {
|
const GInterfaceInfo iface_info = {
|
||||||
(GInterfaceInitFunc) g_type_module_iface_init,
|
(GInterfaceInitFunc) g_type_module_iface_init,
|
||||||
|
@ -85,9 +85,16 @@ g_type_plugin_get_type (void)
|
|||||||
if (!type_plugin_type)
|
if (!type_plugin_type)
|
||||||
{
|
{
|
||||||
const GTypeInfo type_plugin_info = {
|
const GTypeInfo type_plugin_info = {
|
||||||
sizeof (GTypePluginClass),
|
sizeof (GTypePluginClass),
|
||||||
NULL, /* base_init */
|
NULL, /* base_init */
|
||||||
NULL, /* base_finalize */
|
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);
|
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,
|
NULL,
|
||||||
sizeof (TestModule),
|
sizeof (TestModule),
|
||||||
0,
|
0,
|
||||||
(GInstanceInitFunc)NULL
|
(GInstanceInitFunc)NULL,
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
object_type = g_type_register_static (G_TYPE_TYPE_MODULE, "TestModule", &object_info, 0);
|
object_type = g_type_register_static (G_TYPE_TYPE_MODULE, "TestModule", &object_info, 0);
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ test_valuearray_basic (void)
|
|||||||
GValueArray *a2;
|
GValueArray *a2;
|
||||||
GValue v = G_VALUE_INIT;
|
GValue v = G_VALUE_INIT;
|
||||||
GValue *p;
|
GValue *p;
|
||||||
gint i;
|
guint i;
|
||||||
|
|
||||||
a = g_value_array_new (20);
|
a = g_value_array_new (20);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user