mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-13 21:06:17 +01:00
gdate: Fix tautological comparison warnings on Android
Android is emitting `-Wtautological-constant-out-of-range-compare` warnings when compiling the validation functions for the enum types for `GDate`. Fix that by comparing as integers. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
02a7af780b
commit
00c04fdec6
@ -420,7 +420,7 @@ static const guint16 days_in_year[2][14] =
|
|||||||
gboolean
|
gboolean
|
||||||
g_date_valid_month (GDateMonth m)
|
g_date_valid_month (GDateMonth m)
|
||||||
{
|
{
|
||||||
return ( (m > G_DATE_BAD_MONTH) && (m < 13) );
|
return (((gint) m > G_DATE_BAD_MONTH) && ((gint) m < 13));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -466,7 +466,7 @@ g_date_valid_day (GDateDay d)
|
|||||||
gboolean
|
gboolean
|
||||||
g_date_valid_weekday (GDateWeekday w)
|
g_date_valid_weekday (GDateWeekday w)
|
||||||
{
|
{
|
||||||
return ( (w > G_DATE_BAD_WEEKDAY) && (w < 8) );
|
return (((gint) w > G_DATE_BAD_WEEKDAY) && ((gint) w < 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user