GNOME Bugzilla – Bug 785438
Spurious -Wmaybe-uninitialized in gdatetime.c
Last modified: 2017-07-26 16:14:49 UTC
GCC 6.3.1 thinks that tmp is being uninitialized: gdatetime.c: In function ‘format_ampm’: gdatetime.c:2248:7: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized] g_free (tmp); ^~~~~~~~~~~~ It is not an actual problem because the code in question is guarded by "if (!locale_is_utf8)" and "#if defined (HAVE_LANGINFO_TIME)", and it does get initialized under those circumstances. Still, it might be worth fixing it to have a cleaner build and having actual problems stand out more prominently.
Created attachment 356408 [details] [review] gdatetime: Silence -Wmaybe-uninitialized
Created attachment 356409 [details] [review] gdatetime: Silence -Wmaybe-uninitialized Fix a typo in the commit message.
Review of attachment 356409 [details] [review]: Sure.
Comment on attachment 356409 [details] [review] gdatetime: Silence -Wmaybe-uninitialized Pushed to master. Thanks.