summaryrefslogtreecommitdiff
path: root/common/new_nvmem.c
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-06-06 18:54:13 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-07 21:23:50 +0000
commit8d395e29b571878a3ed71652454621b7338b8343 (patch)
treed30c87e5d220f163f827076364b3f6da32de36e8 /common/new_nvmem.c
parent2e3ec3604f774d9c7bb9eaf0aaf339b4a8cbd9cd (diff)
downloadchrome-ec-8d395e29b571878a3ed71652454621b7338b8343.tar.gz
get rid of compiler warnings
The upcoming change of the set of gcc invocation flags would trigger a warnings about a potentially uninitialized variable use. Even though the variables are guaranteed to be initialized in the two cases being touched, let's just pacify the compiler so that in places where it is important we do get the uninitialized variable warning and compilation failure. BRANCH=cr50, cr50-mp BUG=b:134623681 TEST='make buildall -j' succeeds with the new compiler invocation Change-Id: I5ac392d7628931d9e02ea153b3c8a2e7c285050d Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648923 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'common/new_nvmem.c')
-rw-r--r--common/new_nvmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/new_nvmem.c b/common/new_nvmem.c
index d193273ac2..18d4292460 100644
--- a/common/new_nvmem.c
+++ b/common/new_nvmem.c
@@ -1268,7 +1268,7 @@ static uint16_t marshal_state_reset_data(STATE_RESET_DATA *srd, uint8_t *dst)
*/
static enum ec_error_list migrate_tpm_reserved(struct nn_container *ch)
{
- STATE_CLEAR_DATA *scd;
+ STATE_CLEAR_DATA *scd = NULL;
STATE_RESET_DATA *srd;
size_t pcr_type_index;
uint8_t *p_tpm_nvmem = nvmem_cache_base(NVMEM_TPM);