aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBechir Mghirbi <bechir.mghirbi@grammer.com>2019-06-04 10:16:03 +0200
committerBechir Mghirbi <bechir.mghirbi@grammer.com>2019-06-04 16:20:49 +0200
commit5026438e904ac81dccc2d71ee132854ead7935f6 (patch)
tree4dd71bb8a506931263467e96be8b80a75993bd5d
parentd6f6df814d87b5d5f77570196576637c8deb9afe (diff)
Build af-binder-devtools-native using GCC-9.1.1halibut_7.99.2halibut/7.99.27.99.2
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 <bechir.mghirbi@grammer.com> Change-Id: I38d0c6f47fed462f4ea48990c4cb63f21fb2ee16
-rw-r--r--src/devtools/genskel.c3
1 files changed, 2 insertions, 1 deletions
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] = '/';