diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-02-26 09:51:58 -0600 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-02-26 10:12:37 -0800 |
commit | ab63d3c20b8be3f610fff454260f02ab1d7c02b6 (patch) | |
tree | d8af4c030c69c4364da6ab8c0d25d91a9ac8dd28 /firmware | |
parent | 9d7d0cbe132e6660885b72d6c46a2bbc982dca25 (diff) | |
download | vboot-ab63d3c20b8be3f610fff454260f02ab1d7c02b6.tar.gz |
rollback_index: fix -Wshadow warnings
The rollback_index.c file uses a macro RETURN_ON_FAILURE which creates
a locally block-scoped variable named 'result'. However, when built with
-Wshadow -Werror the compile will break because the 'result' variable
will shadow the one function scoped variable. Fix this warning by
changing the variable name from 'result' to 'result_' in
the RETURN_ON_FAILURE macro.
BUG=chrome-os-partner:17695
BRANCH=None
TEST=built fwlib with -Werror -Wshadow. Compiles correctly.
runtests still passes as well.
Change-Id: I9fedef5567411beacdc1c0b8ed182573601f24aa
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44044
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/lib/rollback_index.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c index 1dd2f9e4..0c6e02ac 100644 --- a/firmware/lib/rollback_index.c +++ b/firmware/lib/rollback_index.c @@ -42,11 +42,11 @@ static int g_rollback_recovery_mode = 0; __pragma(warning (disable: 4127)) #define RETURN_ON_FAILURE(tpm_command) do { \ - uint32_t result; \ - if ((result = (tpm_command)) != TPM_SUCCESS) { \ + uint32_t result_; \ + if ((result_ = (tpm_command)) != TPM_SUCCESS) { \ VBDEBUG(("Rollback: %08x returned by " #tpm_command \ - "\n", (int)result)); \ - return result; \ + "\n", (int)result_)); \ + return result_; \ } \ } while (0) |