Merge branch 'wip/pwithnall/wsign-conversion2a' into 'main'

gobject, girepository: Fix several -Wsign-conversion warnings on macOS

See merge request GNOME/glib!4606
This commit is contained in:
Michael Catanzaro
2025-05-05 18:36:32 +00:00
17 changed files with 57 additions and 51 deletions

View File

@@ -641,7 +641,7 @@ gi_repository_dump (const char *input_filename,
if (input == NULL) if (input == NULL)
{ {
int saved_errno = errno; int saved_errno = errno;
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (saved_errno), g_set_error (error, G_FILE_ERROR, (int) g_file_error_from_errno (saved_errno),
"Failed to open %s: %s", input_filename, g_strerror (saved_errno)); "Failed to open %s: %s", input_filename, g_strerror (saved_errno));
g_module_close (self); g_module_close (self);
@@ -653,7 +653,7 @@ gi_repository_dump (const char *input_filename,
if (output == NULL) if (output == NULL)
{ {
int saved_errno = errno; int saved_errno = errno;
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (saved_errno), g_set_error (error, G_FILE_ERROR, (int) g_file_error_from_errno (saved_errno),
"Failed to open %s: %s", output_filename, g_strerror (saved_errno)); "Failed to open %s: %s", output_filename, g_strerror (saved_errno));
fclose (input); fclose (input);
@@ -735,7 +735,7 @@ gi_repository_dump (const char *input_filename,
{ {
int saved_errno = errno; int saved_errno = errno;
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (saved_errno), g_set_error (error, G_FILE_ERROR, (int) g_file_error_from_errno (saved_errno),
"Error closing input file %s: %s", input_filename, "Error closing input file %s: %s", input_filename,
g_strerror (saved_errno)); g_strerror (saved_errno));
caught_error = TRUE; caught_error = TRUE;
@@ -745,7 +745,7 @@ gi_repository_dump (const char *input_filename,
{ {
int saved_errno = errno; int saved_errno = errno;
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (saved_errno), g_set_error (error, G_FILE_ERROR, (int) g_file_error_from_errno (saved_errno),
"Error closing output file %s: %s", output_filename, "Error closing output file %s: %s", output_filename,
g_strerror (saved_errno)); g_strerror (saved_errno));
caught_error = TRUE; caught_error = TRUE;

View File

@@ -60,8 +60,8 @@ gi_arg_info_get_direction (GIArgInfo *info)
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ArgBlob *blob; ArgBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_DIRECTION_OUT);
g_return_val_if_fail (GI_IS_ARG_INFO (info), -1); g_return_val_if_fail (GI_IS_ARG_INFO (info), GI_DIRECTION_OUT);
blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset]; blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
@@ -218,8 +218,8 @@ gi_arg_info_get_ownership_transfer (GIArgInfo *info)
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ArgBlob *blob; ArgBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_TRANSFER_NOTHING);
g_return_val_if_fail (GI_IS_ARG_INFO (info), -1); g_return_val_if_fail (GI_IS_ARG_INFO (info), GI_TRANSFER_NOTHING);
blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset]; blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];
@@ -251,8 +251,8 @@ gi_arg_info_get_scope (GIArgInfo *info)
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ArgBlob *blob; ArgBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_SCOPE_TYPE_INVALID);
g_return_val_if_fail (GI_IS_ARG_INFO (info), -1); g_return_val_if_fail (GI_IS_ARG_INFO (info), GI_SCOPE_TYPE_INVALID);
blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset]; blob = (ArgBlob *)&rinfo->typelib->data[rinfo->offset];

View File

@@ -297,8 +297,8 @@ gi_callable_info_get_caller_owns (GICallableInfo *info)
GIRealInfo *rinfo = (GIRealInfo*) info; GIRealInfo *rinfo = (GIRealInfo*) info;
SignatureBlob *blob; SignatureBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_TRANSFER_NOTHING);
g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), -1); g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), GI_TRANSFER_NOTHING);
blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)]; blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)];
@@ -327,8 +327,8 @@ gi_callable_info_get_instance_ownership_transfer (GICallableInfo *info)
GIRealInfo *rinfo = (GIRealInfo*) info; GIRealInfo *rinfo = (GIRealInfo*) info;
SignatureBlob *blob; SignatureBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_TRANSFER_NOTHING);
g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), -1); g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), GI_TRANSFER_NOTHING);
blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)]; blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)];

View File

@@ -116,8 +116,8 @@ gi_function_info_get_flags (GIFunctionInfo *info)
GIRealInfo *rinfo; GIRealInfo *rinfo;
FunctionBlob *blob; FunctionBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_FUNCTION_INFO_FLAGS_NONE);
g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), -1); g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), GI_FUNCTION_INFO_FLAGS_NONE);
rinfo = (GIRealInfo *)info; rinfo = (GIRealInfo *)info;
blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset]; blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset];

View File

@@ -124,8 +124,8 @@ gi_property_info_get_ownership_transfer (GIPropertyInfo *info)
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
PropertyBlob *blob; PropertyBlob *blob;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_TRANSFER_NOTHING);
g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), -1); g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), GI_TRANSFER_NOTHING);
blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset]; blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];

View File

@@ -198,13 +198,13 @@ gi_repository_get_library_path_macos (void)
if (cmd->cmd == LC_SEGMENT) if (cmd->cmd == LC_SEGMENT)
{ {
struct segment_command *seg = (struct segment_command *) cmd; struct segment_command *seg = (struct segment_command *) cmd;
if (((intptr_t) ptr >= (seg->vmaddr + offset)) && ((intptr_t) ptr < (seg->vmaddr + offset + seg->vmsize))) if (((intptr_t) ptr >= ((intptr_t) seg->vmaddr + offset)) && ((intptr_t) ptr < ((intptr_t) seg->vmaddr + offset + (intptr_t) seg->vmsize)))
return _dyld_get_image_name (i); return _dyld_get_image_name (i);
} }
if (cmd->cmd == LC_SEGMENT_64) if (cmd->cmd == LC_SEGMENT_64)
{ {
struct segment_command_64 *seg = (struct segment_command_64 *) cmd; struct segment_command_64 *seg = (struct segment_command_64 *) cmd;
if (((uintptr_t ) ptr >= (seg->vmaddr + offset)) && ((uintptr_t ) ptr < (seg->vmaddr + offset + seg->vmsize))) if (((intptr_t) ptr >= ((intptr_t) seg->vmaddr + offset)) && ((intptr_t) ptr < ((intptr_t) seg->vmaddr + offset + (intptr_t) seg->vmsize)))
return _dyld_get_image_name (i); return _dyld_get_image_name (i);
} }
/* Jump to the next command */ /* Jump to the next command */

View File

@@ -147,7 +147,7 @@ struct _GIIrNodeType
uint8_t is_ghashtable : 1; uint8_t is_ghashtable : 1;
uint8_t is_interface : 1; uint8_t is_interface : 1;
uint8_t is_error : 1; uint8_t is_error : 1;
int tag; GITypeTag tag;
char *unparsed; /* (owned) */ char *unparsed; /* (owned) */

View File

@@ -499,7 +499,7 @@ static IntegerAliasInfo integer_aliases[] = {
typedef struct { typedef struct {
const char *str; const char *str;
int tag; GITypeTag tag;
gboolean pointer; gboolean pointer;
} BasicTypeInfo; } BasicTypeInfo;

View File

@@ -221,7 +221,7 @@ write_type_info (const char *ns,
GITypeInfo *info, GITypeInfo *info,
Xml *file) Xml *file)
{ {
int tag; GITypeTag tag;
GITypeInfo *type; GITypeInfo *type;
gboolean is_pointer; gboolean is_pointer;

View File

@@ -373,15 +373,15 @@ gi_type_info_get_array_type (GITypeInfo *info)
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
SimpleTypeBlob *type; SimpleTypeBlob *type;
g_return_val_if_fail (info != NULL, -1); g_return_val_if_fail (info != NULL, GI_ARRAY_TYPE_C);
g_return_val_if_fail (GI_IS_TYPE_INFO (info), -1); g_return_val_if_fail (GI_IS_TYPE_INFO (info), GI_ARRAY_TYPE_C);
type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset]; type = (SimpleTypeBlob *)&rinfo->typelib->data[rinfo->offset];
if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0)) if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{ {
ArrayTypeBlob *blob = (ArrayTypeBlob *)&rinfo->typelib->data[rinfo->offset]; ArrayTypeBlob *blob = (ArrayTypeBlob *)&rinfo->typelib->data[rinfo->offset];
g_return_val_if_fail (blob->tag == GI_TYPE_TAG_ARRAY, -1); g_return_val_if_fail (blob->tag == GI_TYPE_TAG_ARRAY, GI_ARRAY_TYPE_C);
return blob->array_type; return blob->array_type;
} }

View File

@@ -366,6 +366,7 @@ typedef enum {
/** /**
* GIFieldInfoFlags: * GIFieldInfoFlags:
* @GI_FIELD_INFO_FLAGS_NONE: no flags set (since: 2.86)
* @GI_FIELD_IS_READABLE: field is readable. * @GI_FIELD_IS_READABLE: field is readable.
* @GI_FIELD_IS_WRITABLE: field is writable. * @GI_FIELD_IS_WRITABLE: field is writable.
* *
@@ -376,12 +377,14 @@ typedef enum {
typedef enum typedef enum
{ {
GI_FIELD_INFO_FLAGS_NONE GI_AVAILABLE_ENUMERATOR_IN_2_86 = 0,
GI_FIELD_IS_READABLE = 1 << 0, GI_FIELD_IS_READABLE = 1 << 0,
GI_FIELD_IS_WRITABLE = 1 << 1 GI_FIELD_IS_WRITABLE = 1 << 1
} GIFieldInfoFlags; } GIFieldInfoFlags;
/** /**
* GIVFuncInfoFlags: * GIVFuncInfoFlags:
* @GI_VFUNC_INFO_FLAGS_NONE: no flags set (since: 2.86)
* @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type * @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type
* @GI_VFUNC_MUST_OVERRIDE: overrides * @GI_VFUNC_MUST_OVERRIDE: overrides
* @GI_VFUNC_MUST_NOT_OVERRIDE: does not override * @GI_VFUNC_MUST_NOT_OVERRIDE: does not override
@@ -392,6 +395,7 @@ typedef enum
*/ */
typedef enum typedef enum
{ {
GI_VFUNC_INFO_FLAGS_NONE GI_AVAILABLE_ENUMERATOR_IN_2_86 = 0,
GI_VFUNC_MUST_CHAIN_UP = 1 << 0, GI_VFUNC_MUST_CHAIN_UP = 1 << 0,
GI_VFUNC_MUST_OVERRIDE = 1 << 1, GI_VFUNC_MUST_OVERRIDE = 1 << 1,
GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2, GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
@@ -399,6 +403,7 @@ typedef enum
/** /**
* GIFunctionInfoFlags: * GIFunctionInfoFlags:
* @GI_FUNCTION_INFO_FLAGS_NONE: no flags set (since: 2.86)
* @GI_FUNCTION_IS_METHOD: is a method. * @GI_FUNCTION_IS_METHOD: is a method.
* @GI_FUNCTION_IS_CONSTRUCTOR: is a constructor. * @GI_FUNCTION_IS_CONSTRUCTOR: is a constructor.
* @GI_FUNCTION_IS_GETTER: is a getter of a [class@GIRepository.PropertyInfo]. * @GI_FUNCTION_IS_GETTER: is a getter of a [class@GIRepository.PropertyInfo].
@@ -411,6 +416,7 @@ typedef enum
*/ */
typedef enum typedef enum
{ {
GI_FUNCTION_INFO_FLAGS_NONE GI_AVAILABLE_ENUMERATOR_IN_2_86 = 0,
GI_FUNCTION_IS_METHOD = 1 << 0, GI_FUNCTION_IS_METHOD = 1 << 0,
GI_FUNCTION_IS_CONSTRUCTOR = 1 << 1, GI_FUNCTION_IS_CONSTRUCTOR = 1 << 1,
GI_FUNCTION_IS_GETTER = 1 << 2, GI_FUNCTION_IS_GETTER = 1 << 2,

View File

@@ -920,7 +920,7 @@ g_closure_invoke (GClosure *closure,
marshal_data); marshal_data);
if (!in_marshal) if (!in_marshal)
closure_invoke_notifiers (closure, POST_NOTIFY); closure_invoke_notifiers (closure, POST_NOTIFY);
ATOMIC_SET (closure, in_marshal, in_marshal); ATOMIC_SET (closure, in_marshal, (guint) in_marshal);
} }
g_closure_unref (closure); g_closure_unref (closure);
} }
@@ -984,7 +984,7 @@ _g_closure_invoke_va (GClosure *closure,
n_params, param_types); n_params, param_types);
if (!in_marshal) if (!in_marshal)
closure_invoke_notifiers (closure, POST_NOTIFY); closure_invoke_notifiers (closure, POST_NOTIFY);
ATOMIC_SET (closure, in_marshal, in_marshal); ATOMIC_SET (closure, in_marshal, (guint) in_marshal);
} }
g_closure_unref (closure); g_closure_unref (closure);
} }

View File

@@ -755,7 +755,7 @@ node_update_single_va_closure (SignalNode *node)
node->single_va_closure_is_valid = TRUE; node->single_va_closure_is_valid = TRUE;
node->single_va_closure = closure; node->single_va_closure = closure;
node->single_va_closure_is_after = is_after; node->single_va_closure_is_after = (guint) is_after;
} }
static inline void static inline void

View File

@@ -736,7 +736,7 @@ g_signal_group_connect_closure_ (GSignalGroup *self,
handler->signal_id = signal_id; handler->signal_id = signal_id;
handler->signal_detail = signal_detail; handler->signal_detail = signal_detail;
handler->closure = g_closure_ref (closure); handler->closure = g_closure_ref (closure);
handler->connect_after = after; handler->connect_after = (guint) after;
g_closure_sink (closure); g_closure_sink (closure);

View File

@@ -1444,7 +1444,7 @@ type_add_interface_Wm (TypeNode *node,
*/ */
if (node->data) if (node->data)
{ {
InitState class_state = g_atomic_int_get (&node->data->class.init_state); InitState class_state = (InitState) g_atomic_int_get (&node->data->class.init_state);
if (class_state >= BASE_IFACE_INIT) if (class_state >= BASE_IFACE_INIT)
type_iface_vtable_base_init_Wm (iface, node); type_iface_vtable_base_init_Wm (iface, node);

View File

@@ -116,7 +116,7 @@ my_test_get_property (GObject *object,
switch (prop_id) switch (prop_id)
{ {
case PROP_FLAGS: case PROP_FLAGS:
g_value_set_flags (value, test->flags); g_value_set_flags (value, (guint) test->flags);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -135,7 +135,7 @@ my_test_set_property (GObject *object,
switch (prop_id) switch (prop_id)
{ {
case PROP_FLAGS: case PROP_FLAGS:
test->flags = g_value_get_flags (value); test->flags = (MyFlagsEnum) g_value_get_flags (value);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -157,7 +157,7 @@ check_flags_validation (void)
for (i = 0; i < G_N_ELEMENTS (test_flags); i++) for (i = 0; i < G_N_ELEMENTS (test_flags); i++)
{ {
guint flag_set = test_flags[i]; guint flag_set = (guint) test_flags[i];
GObject *test = g_object_new (G_TYPE_TEST, GObject *test = g_object_new (G_TYPE_TEST,
"flags", flag_set, "flags", flag_set,
NULL); NULL);

View File

@@ -1164,7 +1164,7 @@ test_interface_default_init (TestInterfaceInterface *iface)
continue; continue;
/* we think that this is impossible. make sure. */ /* we think that this is impossible. make sure. */
pspec = g_param_spec_object ("xyz", "xyz", "xyz", types[i], j); pspec = g_param_spec_object ("xyz", "xyz", "xyz", types[i], (GParamFlags) j);
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
"*assertion*pspec->flags*failed*"); "*assertion*pspec->flags*failed*");
@@ -1176,7 +1176,7 @@ test_interface_default_init (TestInterfaceInterface *iface)
/* install the property */ /* install the property */
g_snprintf (prop_name, sizeof prop_name, "%s-%s", names[i], perms[j]); g_snprintf (prop_name, sizeof prop_name, "%s-%s", names[i], perms[j]);
pspec = g_param_spec_object (prop_name, prop_name, prop_name, types[i], j); pspec = g_param_spec_object (prop_name, prop_name, prop_name, types[i], (GParamFlags) j);
g_object_interface_install_property (iface, pspec); g_object_interface_install_property (iface, pspec);
} }
} }
@@ -1320,8 +1320,8 @@ static gint valid_impl_flags[16][16] = {
static guint change_this_flag; static guint change_this_flag;
static guint change_this_type; static guint change_this_type;
static guint use_this_flag; static GParamFlags use_this_flag;
static guint use_this_type; static size_t use_this_type_index;
typedef GObjectClass TestImplementationClass; typedef GObjectClass TestImplementationClass;
typedef GObject TestImplementation; typedef GObject TestImplementation;
@@ -1371,15 +1371,15 @@ static void test_implementation_class_init (TestImplementationClass *class)
g_error ("Interface property does not exist"); g_error ("Interface property does not exist");
g_snprintf (prop_name, sizeof prop_name, "%s-%s", names[change_this_type], perms[change_this_flag]); g_snprintf (prop_name, sizeof prop_name, "%s-%s", names[change_this_type], perms[change_this_flag]);
pspec = g_param_spec_object (prop_name, prop_name, prop_name, types[use_this_type], use_this_flag); pspec = g_param_spec_object (prop_name, prop_name, prop_name, types[use_this_type_index], use_this_flag);
g_object_class_install_property (class, 1, pspec); g_object_class_install_property (class, 1, pspec);
} }
typedef struct { typedef struct {
guint change_this_flag; guint change_this_flag;
guint change_this_type; guint change_this_type;
guint use_this_flag; GParamFlags use_this_flag;
guint use_this_type; size_t use_this_type_index;
} TestParamImplementData; } TestParamImplementData;
static void static void
@@ -1401,7 +1401,7 @@ test_param_implement_child (gconstpointer user_data)
change_this_flag = data->change_this_flag; change_this_flag = data->change_this_flag;
change_this_type = data->change_this_type; change_this_type = data->change_this_type;
use_this_flag = data->use_this_flag; use_this_flag = data->use_this_flag;
use_this_type = data->use_this_type; use_this_type_index = data->use_this_type_index;
g_type_class_ref (test_implementation_get_type ()); g_type_class_ref (test_implementation_get_type ());
} }
@@ -1421,7 +1421,7 @@ test_param_implement (void)
for (change_this_flag = 0; change_this_flag < 16; change_this_flag++) for (change_this_flag = 0; change_this_flag < 16; change_this_flag++)
for (change_this_type = 0; change_this_type < 3; change_this_type++) for (change_this_type = 0; change_this_type < 3; change_this_type++)
for (use_this_flag = 0; use_this_flag < 16; use_this_flag++) for (use_this_flag = 0; use_this_flag < 16; use_this_flag++)
for (use_this_type = 0; use_this_type < 4; use_this_type++) for (use_this_type_index = 0; use_this_type_index < 4; use_this_type_index++)
{ {
if (!g_test_undefined ()) if (!g_test_undefined ())
{ {
@@ -1429,13 +1429,13 @@ test_param_implement (void)
if (valid_impl_flags[change_this_flag][use_this_flag] != 'v') if (valid_impl_flags[change_this_flag][use_this_flag] != 'v')
continue; continue;
if (valid_impl_types[change_this_type * 16 + change_this_flag][use_this_type] != 'v') if (valid_impl_types[change_this_type * 16 + change_this_flag][use_this_type_index] != 'v')
continue; continue;
} }
test_path = g_strdup_printf ("/param/implement/subprocess/%u-%u-%u-%u", test_path = g_strdup_printf ("/param/implement/subprocess/%u-%u-%u-%" G_GSIZE_FORMAT,
change_this_flag, change_this_type, change_this_flag, change_this_type,
use_this_flag, use_this_type); use_this_flag, use_this_type_index);
g_test_trap_subprocess (test_path, G_TIME_SPAN_SECOND, g_test_trap_subprocess (test_path, G_TIME_SPAN_SECOND,
G_TEST_SUBPROCESS_DEFAULT); G_TEST_SUBPROCESS_DEFAULT);
g_free (test_path); g_free (test_path);
@@ -1445,7 +1445,7 @@ test_param_implement (void)
{ {
case 0: case 0:
/* make sure the other table agrees */ /* make sure the other table agrees */
g_assert_cmpint (valid_impl_types[change_this_type * 16 + change_this_flag][use_this_type], ==, 0); g_assert_cmpint (valid_impl_types[change_this_type * 16 + change_this_flag][use_this_type_index], ==, 0);
g_test_trap_assert_failed (); g_test_trap_assert_failed ();
g_test_trap_assert_stderr ("*Interface property does not exist*"); g_test_trap_assert_stderr ("*Interface property does not exist*");
continue; continue;
@@ -1470,7 +1470,7 @@ test_param_implement (void)
} }
/* Next, we check if there should have been a type error. */ /* Next, we check if there should have been a type error. */
switch (valid_impl_types[change_this_type * 16 + change_this_flag][use_this_type]) switch (valid_impl_types[change_this_type * 16 + change_this_flag][use_this_type_index])
{ {
case 0: case 0:
/* this should have been caught above */ /* this should have been caught above */
@@ -1684,11 +1684,11 @@ main (int argc, char *argv[])
for (data.change_this_flag = 0; data.change_this_flag < 16; data.change_this_flag++) for (data.change_this_flag = 0; data.change_this_flag < 16; data.change_this_flag++)
for (data.change_this_type = 0; data.change_this_type < 3; data.change_this_type++) for (data.change_this_type = 0; data.change_this_type < 3; data.change_this_type++)
for (data.use_this_flag = 0; data.use_this_flag < 16; data.use_this_flag++) for (data.use_this_flag = 0; data.use_this_flag < 16; data.use_this_flag++)
for (data.use_this_type = 0; data.use_this_type < 4; data.use_this_type++) for (data.use_this_type_index = 0; data.use_this_type_index < 4; data.use_this_type_index++)
{ {
test_path = g_strdup_printf ("/param/implement/subprocess/%u-%u-%u-%u", test_path = g_strdup_printf ("/param/implement/subprocess/%u-%u-%u-%" G_GSIZE_FORMAT,
data.change_this_flag, data.change_this_type, data.change_this_flag, data.change_this_type,
data.use_this_flag, data.use_this_type); data.use_this_flag, data.use_this_type_index);
test_data = g_memdup2 (&data, sizeof (TestParamImplementData)); test_data = g_memdup2 (&data, sizeof (TestParamImplementData));
g_test_add_data_func_full (test_path, g_steal_pointer (&test_data), test_param_implement_child, g_free); g_test_add_data_func_full (test_path, g_steal_pointer (&test_data), test_param_implement_child, g_free);
g_free (test_path); g_free (test_path);