Fix the LGTM warning fired by the rule that finds code that could convert the result of an integer multiplication to a larger type. Since the conversion applies after the multiplication, arithmetic overflow may still occur. Signed-off-by: Elia Pinto <gitter.spiros@xxxxxxxxx> --- date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/date.c b/date.c index 041db7db4e..b8dcbdbb0e 100644 --- a/date.c +++ b/date.c @@ -1172,7 +1172,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm while (tl->type) { int len = strlen(tl->type); if (match_string(date, tl->type) >= len-1) { - update_tm(tm, now, tl->length * *num); + update_tm(tm, now, (time_t)tl->length * *num); *num = 0; *touched = 1; return end; -- 2.24.0.rc0.467.g566ccdd3e4.dirty