Interface: Improve code quality
This patch fixes the following things:
* avoid implicit casting by using matching types or casting when it is
safe
* initialise unitialised variables
* check the returning value of functions
Change-Id: I0fda9b6d3ba9dbc86654685736a37a60f5db9a75
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
diff --git a/interface/include/tfm_ns_svc.h b/interface/include/tfm_ns_svc.h
index 0399af9..a45cd97 100644
--- a/interface/include/tfm_ns_svc.h
+++ b/interface/include/tfm_ns_svc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -59,7 +59,7 @@
};
/* number of user SVC functions */
-#define USER_SVC_COUNT (SVC_TFM_MAX - 1)
+#define USER_SVC_COUNT ((uint32_t)SVC_TFM_MAX - 1)
#ifdef __cplusplus
}