From 037719c27c541e5e529c7f0dc8a14792a26303c9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 14 Aug 2016 15:36:17 +0100 Subject: [PATCH] gdbus-example-unix-fd-client: avoid strftime %c specifier gcc 6 warns (fatally, by default) that %c only uses a 2-digit year in some locales. The precise format does not seem to be important for this sample code, so use ISO 8601 instead of suppressing the warning with a pragma. Signed-off-by: Simon McVittie Reviewed-by: Colin Walters Bug: https://bugzilla.gnome.org/show_bug.cgi?id=768453 --- gio/tests/gdbus-example-unix-fd-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/gdbus-example-unix-fd-client.c b/gio/tests/gdbus-example-unix-fd-client.c index e3ab015bd..cf1330fda 100644 --- a/gio/tests/gdbus-example-unix-fd-client.c +++ b/gio/tests/gdbus-example-unix-fd-client.c @@ -82,7 +82,7 @@ on_name_appeared (GDBusConnection *connection, now = time (NULL); strftime (now_buf, sizeof now_buf, - "%c", + "%Y-%m-%d %H:%M:%S", localtime (&now)); str = g_strdup_printf ("On %s, gdbus-example-unix-fd-client with pid %d was here!\n",