mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-01 11:26:37 +02:00
tests: Fix various -Wsign-conversion warnings with flags in gobject tests
Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3405
This commit is contained in:
@@ -75,8 +75,8 @@ my_test_flags_get_type (void)
|
|||||||
if (G_UNLIKELY(flags_type == 0))
|
if (G_UNLIKELY(flags_type == 0))
|
||||||
{
|
{
|
||||||
static const GFlagsValue values[] = {
|
static const GFlagsValue values[] = {
|
||||||
{ LOWEST_FLAG, "LOWEST_FLAG", "lowest" },
|
{ (unsigned) LOWEST_FLAG, "LOWEST_FLAG", "lowest" },
|
||||||
{ HIGHEST_FLAG, "HIGHEST_FLAG", "highest" },
|
{ (unsigned) HIGHEST_FLAG, "HIGHEST_FLAG", "highest" },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ my_test_set_property (GObject *object,
|
|||||||
static void
|
static void
|
||||||
check_flags_validation (void)
|
check_flags_validation (void)
|
||||||
{
|
{
|
||||||
guint test_flags[] = {
|
MyFlagsEnum test_flags[] = {
|
||||||
NO_FLAG,
|
NO_FLAG,
|
||||||
LOWEST_FLAG,
|
LOWEST_FLAG,
|
||||||
HIGHEST_FLAG,
|
HIGHEST_FLAG,
|
||||||
|
@@ -118,7 +118,7 @@ static const GEnumValue my_enum_values[] =
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
MY_FLAGS_FIRST_BIT = (1 << 0),
|
MY_FLAGS_FIRST_BIT = (1 << 0),
|
||||||
MY_FLAGS_THIRD_BIT = (1 << 2),
|
MY_FLAGS_THIRD_BIT = (1 << 2),
|
||||||
MY_FLAGS_LAST_BIT = (1 << 31)
|
MY_FLAGS_LAST_BIT = (1u << 31)
|
||||||
} MyFlags;
|
} MyFlags;
|
||||||
|
|
||||||
static const GFlagsValue my_flag_values[] =
|
static const GFlagsValue my_flag_values[] =
|
||||||
|
Reference in New Issue
Block a user