gdatetime: Silence -Wmaybe-uninitialized
commita7926117dde57d6408f292b54d9950b3a1f4cb79
authorDebarshi Ray <debarshir@gnome.org>
Wed, 26 Jul 2017 09:34:02 +0000 (26 11:34 +0200)
committerDebarshi Ray <debarshir@gnome.org>
Wed, 26 Jul 2017 16:14:10 +0000 (26 18:14 +0200)
tree617a025137deb7b2769e7f03ca48507f2902debf
parent528a1b9288e410f961b012c75d4887da3ad15b2e
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
glib/gdatetime.c