Skip to content
  • Debarshi Ray's avatar
    gdatetime: Silence -Wmaybe-uninitialized · a7926117
    Debarshi Ray authored
    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
    a7926117