Fix some warnings, GitHub issue 2382.

This commit is contained in:
nicm
2020-09-16 18:37:55 +00:00
parent 1fed7e84a3
commit 869c0e860f
5 changed files with 10 additions and 30 deletions

View File

@ -1373,7 +1373,6 @@ format_pretty_time(time_t t)
struct tm now_tm, tm;
time_t now, age;
char s[6];
int m;
time(&now);
if (now < t)
@ -1397,10 +1396,6 @@ format_pretty_time(time_t t)
}
/* Last 12 months. */
if (now_tm.tm_mon == 0)
m = 11;
else
m = now_tm.tm_mon - 1;
if ((tm.tm_year == now_tm.tm_year && tm.tm_mon < now_tm.tm_mon) ||
(tm.tm_year == now_tm.tm_year - 1 && tm.tm_mon > now_tm.tm_mon)) {
strftime(s, sizeof s, "%d%b", &tm);