mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user