From 5026438e904ac81dccc2d71ee132854ead7935f6 Mon Sep 17 00:00:00 2001 From: Bechir Mghirbi Date: Tue, 4 Jun 2019 10:16:03 +0200 Subject: [PATCH] Build af-binder-devtools-native using GCC-9.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit GCC-9.1.1 complains about variable ‘buf[0]’ that it may be used uninitialized in the function 'make_info()'. This patchset initialize the variable. Bug-AGL: SPEC-2482 Signed-off-by: Bechir Mghirbi Change-Id: I38d0c6f47fed462f4ea48990c4cb63f21fb2ee16 --- src/devtools/genskel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devtools/genskel.c b/src/devtools/genskel.c index 5e9c37e0..80dcd381 100644 --- a/src/devtools/genskel.c +++ b/src/devtools/genskel.c @@ -192,7 +192,7 @@ char *cify(const char *str) char *make_info(const char *text, int split) { const char *a, *b; - char *desc, c, buf[3]; + char *desc, c, buf[3] = {0}; size_t len; int i, pos, e; @@ -221,6 +221,7 @@ char *make_info(const char *text, int split) switch ((c = *b++)) { case 0: b--; + buf[0] = 0; break; case '/': buf[0] = '/'; -- 2.16.6