fix(src/load): fix error when log_level < LOG_LEVEL_WARNING
This patch fixes the following compilation error when a platform
sets the log level to any value less than LOG_LEVEL_WARNING.
<snip>
hafnium/src/load.c:510:14: error: unused variable 'error_string' [-Werror,-Wunused-variable]
const char *error_string = " region security state ignored for ";
<snip>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I342a30774408df2db4ac6a1f4b19df9e5ee32392
diff --git a/src/load.c b/src/load.c
index d105f72..75feb36 100644
--- a/src/load.c
+++ b/src/load.c
@@ -509,7 +509,9 @@
const struct manifest_vm *manifest_vm,
const struct memiter *cpio, struct mpool *ppool)
{
+#if LOG_LEVEL >= LOG_LEVEL_WARNING
const char *error_string = " region security state ignored for ";
+#endif
struct vm *vm;
struct vm_locked vm_locked;
struct vcpu_locked vcpu_locked;