mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 10:16:17 +01:00
gdatetime: Silence -Wmaybe-uninitialized
GCC 6.3.1 thinks that tmp is being used 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 is a small price to pay for a cleaner build and having actual problems stand out more prominently. https://bugzilla.gnome.org/show_bug.cgi?id=785438
This commit is contained in:
parent
528a1b9288
commit
a7926117dd
@ -2220,7 +2220,7 @@ format_ampm (GDateTime *datetime,
|
||||
gboolean uppercase)
|
||||
{
|
||||
const gchar *ampm;
|
||||
gchar *tmp, *ampm_dup;
|
||||
gchar *tmp = NULL, *ampm_dup;
|
||||
gsize len;
|
||||
|
||||
ampm = GET_AMPM (datetime);
|
||||
|
Loading…
Reference in New Issue
Block a user