Ruediger Meier
2017-04-07 12:24:10 UTC
From: Ruediger Meier <***@ga-group.nl>
clang warns about this:
lib/parse-date.y:909:16: warning: absolute value function 'abs' given an
argument of type 'long' but has parameter of type 'int' which may cause
truncation of value [-Wabsolute-value]
Signed-off-by: Ruediger Meier <***@ga-group.nl>
---
lib/parse-datetime.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y
index 51ba4cc..b3a872b 100644
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -1154,7 +1154,7 @@ time_zone_hhmm (parser_control *pc, textint s, long int mm)
/* If the absolute number of minutes is larger than 24 hours,
arrange to reject it by incrementing pc->zones_seen. Thus,
we allow only values in the range UTC-24:00 to UTC+24:00. */
- if (24 * 60 < abs (n_minutes))
+ if (24 * 60 < labs (n_minutes))
pc->zones_seen++;
return n_minutes;
clang warns about this:
lib/parse-date.y:909:16: warning: absolute value function 'abs' given an
argument of type 'long' but has parameter of type 'int' which may cause
truncation of value [-Wabsolute-value]
Signed-off-by: Ruediger Meier <***@ga-group.nl>
---
lib/parse-datetime.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y
index 51ba4cc..b3a872b 100644
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -1154,7 +1154,7 @@ time_zone_hhmm (parser_control *pc, textint s, long int mm)
/* If the absolute number of minutes is larger than 24 hours,
arrange to reject it by incrementing pc->zones_seen. Thus,
we allow only values in the range UTC-24:00 to UTC+24:00. */
- if (24 * 60 < abs (n_minutes))
+ if (24 * 60 < labs (n_minutes))
pc->zones_seen++;
return n_minutes;
--
1.8.5.6
1.8.5.6