From 169002ef7f10d0eb6731f5b169c8eb666cd8ace7 Mon Sep 17 00:00:00 2001 From: orbea Date: Sun, 16 Dec 2018 19:13:33 -0800 Subject: [PATCH] Fix a gcc -Wformat= warning with C89_BUILD. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The posix spec claims "%r" is equivelent to "%I : %M : %S %p". Source: http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html menu/menu_driver.c:395:15: warning: ISO C90 does not support the ‘%r’ gnu_strftime format [-Wformat=] "%r", localtime(&time_)); ^ --- menu/menu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index f6d575538a..dcd2e2af25 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -392,7 +392,7 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime) case 7: /* Time (hours-minutes), in 12 hour AM-PM designation */ #if defined(__linux__) && !defined(ANDROID) strftime(datetime->s, datetime->len, - "%r", localtime(&time_)); + "%I : %M : %S %p", localtime(&time_)); #else { char *local;