mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
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 <smcv@debian.org> Reviewed-by: Colin Walters Bug: https://bugzilla.gnome.org/show_bug.cgi?id=768453
This commit is contained in:
parent
634990a374
commit
037719c27c
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user