diff options
Diffstat (limited to 'src/who.c')
-rw-r--r-- | src/who.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -26,6 +26,7 @@ #include <config.h> #include <getopt.h> #include <stdio.h> +#include <assert.h> #include <sys/types.h> #include "system.h" @@ -198,6 +199,9 @@ idle_string (time_t when, time_t boottime) else { static char idle_hhmm[IDLESTR_LEN]; + /* FIXME-in-2018: see if this assert is still required in order + to suppress gcc's unwarranted -Wformat-length= warning. */ + assert (seconds_idle / (60 * 60) < 24); sprintf (idle_hhmm, "%02d:%02d", seconds_idle / (60 * 60), (seconds_idle % (60 * 60)) / 60); |