diff options
author | Anatol Pomazau <anatol@chromium.org> | 2015-04-10 23:10:19 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-04-13 18:44:24 +0000 |
commit | 57e881dedcd136ca6e15716d7c7348338a7953ca (patch) | |
tree | fbd5669d0f9eaebcf391c25abcfb4e1a4c079ffe /host | |
parent | c1a96b0f42673494a4378876e03c394c30b75a83 (diff) | |
download | vboot-57e881dedcd136ca6e15716d7c7348338a7953ca.tar.gz |
futility: Initialize stack variables
This suppresses following 'maybe-uninitialized' gcc 4.9.2 errors:
CC futility/futility.o
futility/futility.c: In function ‘do_help’:
futility/futility.c:262:2: error: ‘vstr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
printf("The following %scommands are built-in:\n\n", vstr);
^
cc1: all warnings being treated as errors
host/lib21/host_misc.c: In function ‘vb2_str_to_id’:
host/lib21/host_misc.c:154:14: error: ‘val’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
id->raw[i] = val;
^
cc1: all warnings being treated as errors
BUG=none
BRANCH=none
TEST=compile, run unit tests
Change-Id: I6b9d19f2d6e9deb2010dd22602d2a3310f4db335
Signed-off-by: Anatol Pomazau <anatol@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/265370
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Anatol Pomazau <anatol@google.com>
Tested-by: Anatol Pomazau <anatol@google.com>
Diffstat (limited to 'host')
-rw-r--r-- | host/lib21/host_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib21/host_misc.c b/host/lib21/host_misc.c index db5e8243..ee9426a6 100644 --- a/host/lib21/host_misc.c +++ b/host/lib21/host_misc.c @@ -138,7 +138,7 @@ static const char *onebyte(const char *str, uint8_t *vptr) int vb2_str_to_id(const char *str, struct vb2_id *id) { - uint8_t val; + uint8_t val = 0; int i; if (!str) |