diff options
| author | Mattias Andrée <maandree@kth.se> | 2021-04-06 16:48:54 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2021-04-06 16:48:54 +0200 |
| commit | 32fe735311bccb1a0cfe53cab9c07888c6e71690 (patch) | |
| tree | 476b6d0f766100e2643b96615c3ffcac9d6a74dc | |
| parent | Begin working on checklist (diff) | |
| download | pdatools-32fe735311bccb1a0cfe53cab9c07888c6e71690.tar.gz pdatools-32fe735311bccb1a0cfe53cab9c07888c6e71690.tar.bz2 pdatools-32fe735311bccb1a0cfe53cab9c07888c6e71690.tar.xz | |
Silence warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
| -rw-r--r-- | clock.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -140,6 +140,12 @@ display_clock(int timerfd) now->tm_sec += leap_insert = 1; } +#if defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +# pragma GCC diagnostic ignored "-Wformat-truncation" +#endif + strftime(week, sizeof(week), week_fmt, now); len1 = snprintf(line1, sizeof(line1), "%i-(%02i)%.3s-%02i", now->tm_year + 1900, now->tm_mon + 1, &months[(size_t)now->tm_mon % 12 * 3], now->tm_mday); @@ -147,6 +153,10 @@ display_clock(int timerfd) &weekdays[(size_t)now->tm_mday % 7 * 3], week, tzname[now->tm_isdst]); len3 = snprintf(line3, sizeof(line3), "(@%ji%s)", (intmax_t)timex.time.tv_sec, leap_insert ? "+1" : ""); +#if defined(__GNUC__) +# pragma GCC diagnostic pop +#endif + printf("\033[H"); if (x >= 6 * LARGE_X + 2 * LARGE_XC && y > LARGE_Y + 1) { |
