Tegra: enable 'signed-comparison' compilation warning/errors
This patch enables the 'sign-compare' flag, to enable warning/errors
for comparisons between signed/unsigned variables. The warning has
been enabled for all the Tegra platforms, to start with.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
diff --git a/common/runtime_svc.c b/common/runtime_svc.c
index 7b38847..0ea4cd0 100644
--- a/common/runtime_svc.c
+++ b/common/runtime_svc.c
@@ -36,15 +36,16 @@
unsigned int flags)
{
u_register_t x1, x2, x3, x4;
- int index, idx;
+ int index;
+ unsigned int idx;
const rt_svc_desc_t *rt_svc_descs;
assert(handle);
idx = get_unique_oen_from_smc_fid(smc_fid);
- assert(idx >= 0 && idx < MAX_RT_SVCS);
+ assert(idx < MAX_RT_SVCS);
index = rt_svc_descs_indices[idx];
- if (index < 0 || index >= RT_SVC_DECS_NUM)
+ if (index < 0 || index >= (int)RT_SVC_DECS_NUM)
SMC_RET1(handle, SMC_UNK);
rt_svc_descs = (rt_svc_desc_t *) RT_SVC_DESCS_START;
@@ -89,7 +90,8 @@
******************************************************************************/
void runtime_svc_init(void)
{
- int rc = 0, index, start_idx, end_idx;
+ int rc = 0;
+ unsigned int index, start_idx, end_idx;
/* Assert the number of descriptors detected are less than maximum indices */
assert((RT_SVC_DESCS_END >= RT_SVC_DESCS_START) &&