app: aboot: Fix warnings in verified boot
Fix warnings in verified boot feature
Change-Id: I6010f798b8a72f7ecb9e93560480797bd235407c
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index de8948e..9da4d6a 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -2,7 +2,7 @@
* Copyright (c) 2009, Google Inc.
* All rights reserved.
*
- * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -690,11 +690,14 @@
static void verify_signed_bootimg(uint32_t bootimg_addr, uint32_t bootimg_size)
{
int ret;
+
+#if !VERIFIED_BOOT
#if IMAGE_VERIF_ALGO_SHA1
uint32_t auth_algo = CRYPTO_AUTH_ALG_SHA1;
#else
uint32_t auth_algo = CRYPTO_AUTH_ALG_SHA256;
#endif
+#endif
/* Assume device is rooted at this time. */
device.is_tampered = 1;
@@ -1437,7 +1440,9 @@
{
struct device_info *info = (void*) info_buf;
unsigned long long ptn = 0;
+#if !VERIFIED_BOOT
unsigned long long size;
+#endif
int index = INVALID_PTN;
uint32_t blocksize;
uint8_t lun = 0;
@@ -1457,7 +1462,9 @@
lun = partition_get_lun(index);
mmc_set_lun(lun);
+#if !VERIFIED_BOOT
size = partition_get_size(index);
+#endif
memcpy(info, dev, sizeof(device_info));
@@ -1478,7 +1485,9 @@
{
struct device_info *info = (void*) info_buf;
unsigned long long ptn = 0;
+#if !VERIFIED_BOOT
unsigned long long size;
+#endif
int index = INVALID_PTN;
uint32_t blocksize;
@@ -1496,7 +1505,9 @@
mmc_set_lun(partition_get_lun(index));
+#if !VERIFIED_BOOT
size = partition_get_size(index);
+#endif
blocksize = mmc_get_device_blocksize();