From: Bechir Mghirbi Date: Tue, 4 Jun 2019 08:16:03 +0000 (+0200) Subject: Build af-binder-devtools-native using GCC-9.1.1 X-Git-Tag: 7.99.2^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=commitdiff_plain;h=5026438e904ac81dccc2d71ee132854ead7935f6 Build af-binder-devtools-native using GCC-9.1.1 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 --- 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] = '/';