Skip to content

Commit

Permalink
echo.c: Avoid -Wsign-compare with MinGW on 32bit systems
Browse files Browse the repository at this point in the history
echo.c:221:72: error: comparison of integer expressions of
different signedness: ‘long unsigned int’ and
‘time_t’ {aka ‘long int’} [-Werror=sign-compare]

Signed-off-by: Frank Lichtenheld <[email protected]>
  • Loading branch information
flichtenheld authored and cron2 committed Feb 18, 2025
1 parent 91b0b1e commit 5f84460
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ echo_msg_repeated(const struct echo_msg *msg)
const struct echo_msg_history *hist;

hist = echo_msg_recall(msg->fp.digest, msg->history);
return (hist && (hist->fp.timestamp + o.popup_mute_interval * 3600 > msg->fp.timestamp));
return (hist
&& (hist->fp.timestamp + (time_t)(o.popup_mute_interval * 3600) > msg->fp.timestamp));
}

/* Append a line of echo msg */
Expand Down

0 comments on commit 5f84460

Please sign in to comment.