From 3e619ccffe585ddf19b1faa053ff46654d2b8a48 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 14 Mar 2018 15:08:36 +1000 Subject: make_aligned_titles: initialise wbuf This prevents a valgrind warning from deep inside wcstombs. Signed-off-by: Allan McRae --- src/pacman/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/package.c b/src/pacman/package.c index 99d1495f..be5456aa 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -92,7 +92,7 @@ static void make_aligned_titles(void) size_t maxlen = 0; int maxcol = 0; static const wchar_t title_suffix[] = L" :"; - wchar_t wbuf[ARRAYSIZE(titles)][TITLE_MAXLEN + ARRAYSIZE(title_suffix)]; + wchar_t wbuf[ARRAYSIZE(titles)][TITLE_MAXLEN + ARRAYSIZE(title_suffix)] = {{ 0 }}; size_t wlen[ARRAYSIZE(wbuf)]; int wcol[ARRAYSIZE(wbuf)]; char *buf[ARRAYSIZE(wbuf)]; -- cgit v1.2.3-70-g09d2