mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gdatetime: Fix a maybe-uninitialized warning
scan-build thinks that `tmp` can be dereferenced before it’s all been assigned to. I don’t think that’s the case, because the number of elements in it which have been assigned to is tracked as `i`. But static analysers find that kind of state tracking hard to reason about, so let’s just zero-initialise the array to simplify things. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
f1d5a71bbc
commit
057f0fcbfb
@ -3104,7 +3104,7 @@ format_number (GString *str,
|
||||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
||||
};
|
||||
const gchar * const *digits = ascii_digits;
|
||||
const gchar *tmp[10];
|
||||
const gchar *tmp[10] = { '\0', };
|
||||
gint i = 0;
|
||||
#ifdef HAVE_LANGINFO_OUTDIGIT
|
||||
static GMutex alt_digits_mutex;
|
||||
|
Loading…
Reference in New Issue
Block a user