From 00c04fdec64d605fa6f142c0d8048bcb5dbd567c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 25 Sep 2019 15:17:37 +0100 Subject: [PATCH] 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 --- glib/gdate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/gdate.c b/glib/gdate.c index 26b3f598e..b867ba9db 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -420,7 +420,7 @@ static const guint16 days_in_year[2][14] = gboolean 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 g_date_valid_weekday (GDateWeekday w) { - return ( (w > G_DATE_BAD_WEEKDAY) && (w < 8) ); + return (((gint) w > G_DATE_BAD_WEEKDAY) && ((gint) w < 8)); } /**