summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-06-06 18:54:13 -0700
committerVadim Bendebury <vbendeb@chromium.org>2019-09-21 19:11:23 -0700
commitba745de206b3b20513a918ed584c9fb9d6c45111 (patch)
tree87c25b4c6f1898abe247e96b68ed3a22389d811e
parent4f9526b7b9788450ff32512eb2e1eea00a9a8f24 (diff)
downloadchrome-ec-ba745de206b3b20513a918ed584c9fb9d6c45111.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> (cherry picked from commit 8d395e29b571878a3ed71652454621b7338b8343) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1653657 (cherry picked from commit f20f096de97764bd6d09e31918fd1212337c1ce2) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1705723 (cherry picked from commit ad9cfe6f1045ecf03453cd3ef0ecac13727f1c85)
-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);