summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuo Ji <ji.luo@nxp.com>2018-06-25 09:38:57 +0800
committerJi Luo <ji.luo@nxp.com>2018-08-20 21:25:47 +0800
commita2511066236be654594b61e933012d80b710f6aa (patch)
tree874865d3ec066f988f2251c5166c982308398b8b /lib
parent6c1d174ae13542913800be925d20e644fa4a8e87 (diff)
[iot] Fix 'calc_sha256' not defined error
'calc_sha256' should only be valid when CONFIG_IMX_TRUSTY_OS is defined. Error message is like below: error: label 'calc_sha256' defined but not used [-Werror=unused-label] Test: build pass with or without CONFIG_IMX_TRUSTY_OS enabled. Change-Id: I0938e641596cb9faccd0c64f7c03d526dab3b7d4 Signed-off-by: Luo Ji <ji.luo@nxp.com> Reviewed-on: http://androidsource.ap.freescale.net/project/4932 Reviewed-by: Wang Haoran <elven.wang@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/avb/fsl/fsl_avbkey.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/avb/fsl/fsl_avbkey.c b/lib/avb/fsl/fsl_avbkey.c
index 50f6ebd6ff..d934ac61a4 100644
--- a/lib/avb/fsl/fsl_avbkey.c
+++ b/lib/avb/fsl/fsl_avbkey.c
@@ -198,7 +198,9 @@ static int permanent_attributes_sha256_hash(unsigned char* output) {
sizeof(fsl_product_root_public_key));
memcpy(attributes.product_id, fsl_atx_product_id,
sizeof(fsl_atx_product_id));
+#ifdef CONFIG_IMX_TRUSTY_OS
calc_sha256:
+#endif
/* calculate sha256(permanent attributes) hash */
if (sha256((unsigned char *)&attributes, sizeof(AvbAtxPermanentAttributes),
output) == RESULT_ERROR) {