SPM: Fix compiler warning
If passing an address to the macro "UNI_LISI_INIT_HEAD(head)",
the GNUARM compiler reports an warning:
“warning: the address of 'x' will always evaluate as 'true'”.
This patch is to eliminate this warning.
Change-Id: If07b5ed45f9757a78dbb68e25f1334c0cc9ab7d3
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/secure_fw/spm/include/lists.h b/secure_fw/spm/include/lists.h
index c630ff7..c0962c5 100644
--- a/secure_fw/spm/include/lists.h
+++ b/secure_fw/spm/include/lists.h
@@ -64,7 +64,7 @@
/* Initialize the head node */
#define UNI_LISI_INIT_HEAD(head) do { \
- if (head) { \
+ if ((head) != NULL) { \
(head)->next = NULL; \
} \
} while (0)