mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
girepository: Fix various implicit conversions from size_t to smaller types
Basically various trivial instances of the following MSVC compiler warning: ``` ../gio/gio-tool-set.c(50): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data ``` Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
e7aa0039b9
commit
ec36370dcb
@ -223,12 +223,14 @@ gi_base_info_type_register_static (const char *type_name,
|
||||
{
|
||||
GTypeInfo info;
|
||||
|
||||
g_assert (instance_size <= G_MAXUINT16);
|
||||
|
||||
info.class_size = sizeof (GIBaseInfoClass);
|
||||
info.base_init = NULL;
|
||||
info.base_finalize = NULL;
|
||||
info.class_init = class_init;
|
||||
info.class_finalize = NULL;
|
||||
info.instance_size = instance_size;
|
||||
info.instance_size = (guint16) instance_size;
|
||||
info.n_preallocs = 0;
|
||||
info.instance_init = NULL;
|
||||
info.value_table = NULL;
|
||||
|
@ -651,7 +651,7 @@ gi_callable_info_invoke (GICallableInfo *info,
|
||||
GITypeInfo *rinfo;
|
||||
GITypeTag rtag;
|
||||
GIArgInfo *ainfo;
|
||||
size_t n_args, n_invoke_args, in_pos, out_pos, i;
|
||||
unsigned int n_args, n_invoke_args, in_pos, out_pos, i;
|
||||
void **args;
|
||||
gboolean success = FALSE;
|
||||
GError *local_error = NULL;
|
||||
|
@ -190,7 +190,7 @@ gi_field_info_get_field (GIFieldInfo *field_info,
|
||||
void *mem,
|
||||
GIArgument *value)
|
||||
{
|
||||
int offset;
|
||||
size_t offset;
|
||||
GITypeInfo *type_info;
|
||||
gboolean result = FALSE;
|
||||
|
||||
@ -385,7 +385,7 @@ gi_field_info_set_field (GIFieldInfo *field_info,
|
||||
void *mem,
|
||||
const GIArgument *value)
|
||||
{
|
||||
int offset;
|
||||
size_t offset;
|
||||
GITypeInfo *type_info;
|
||||
gboolean result = FALSE;
|
||||
|
||||
|
@ -571,7 +571,7 @@ gi_ir_node_get_size (GIIrNode *node)
|
||||
|
||||
g_assert (size <= G_MAXUINT32);
|
||||
|
||||
return size;
|
||||
return (guint32) size;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1338,7 +1338,8 @@ gi_ir_writer_write (GIRepository *repository,
|
||||
gboolean show_all)
|
||||
{
|
||||
FILE *ofile;
|
||||
size_t i, j;
|
||||
size_t i;
|
||||
unsigned int j;
|
||||
char **dependencies;
|
||||
Xml *xml;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user