diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2017-06-07 09:57:42 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2017-06-14 14:59:07 -0700 |
commit | 6311f63de02ee04d93016242977ade4727089de8 (patch) | |
tree | 831af3c8fefba670513cfc5d4b1838df1266b3ed /common/runtime_svc.c | |
parent | dfe30efb1d5ae7db8f216bb1d5f2c2b58afec33b (diff) |
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>
Diffstat (limited to 'common/runtime_svc.c')
-rw-r--r-- | common/runtime_svc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/runtime_svc.c b/common/runtime_svc.c index 7b38847b..0ea4cd09 100644 --- a/common/runtime_svc.c +++ b/common/runtime_svc.c @@ -36,15 +36,16 @@ uintptr_t handle_runtime_svc(uint32_t smc_fid, 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 @@ static int32_t validate_rt_svc_desc(const rt_svc_desc_t *desc) ******************************************************************************/ 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) && |