diff options
author | Manish V Badarkhe <Manish.Badarkhe@arm.com> | 2020-03-22 04:23:24 +0000 |
---|---|---|
committer | Manish V Badarkhe <Manish.Badarkhe@arm.com> | 2020-03-25 13:58:55 +0000 |
commit | 4c4a1327ae5efc360a98f6be6839ac3652d63fb2 (patch) | |
tree | 5b75431e2c46bfbb761662d77beddfab92ee7f5c /include | |
parent | 92ce719b559146b038d69940aff181c0a8b461fd (diff) | |
download | platform_external_arm-trusted-firmware-4c4a1327ae5efc360a98f6be6839ac3652d63fb2.tar.gz platform_external_arm-trusted-firmware-4c4a1327ae5efc360a98f6be6839ac3652d63fb2.tar.bz2 platform_external_arm-trusted-firmware-4c4a1327ae5efc360a98f6be6839ac3652d63fb2.zip |
Fix 'tautological-constant-compare' error
Fixed below 'tautological-constant-compare' error when building the source
code with latest clang compiler <clang version 11.0.0>.
plat/common/plat_psci_common.c:36:2:
error: converting the result of '<<' to a boolean always evaluates
to true [-Werror,-Wtautological-constant-compare]
PMF_STORE_ENABLE)
^
include/lib/pmf/pmf.h:28:29: note: expanded from macro 'PMF_STORE_ENABLE'
PMF_STORE_ENABLE (1 << 0)
This error is observed beacuse of CASSERT placed in
"PMF_DEFINE_CAPTURE_TIMESTAMP" which do below stuff:
CASSERT(_flags, select_proper_config);
where _flags = PMF_STORE_ENABLE (1 << 0) which always results true.
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ifa82ea202496a23fdf1d27ea1798d1f1b583a021
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/pmf/pmf_helpers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib/pmf/pmf_helpers.h b/include/lib/pmf/pmf_helpers.h index db38e556a..cfb27f7dc 100644 --- a/include/lib/pmf/pmf_helpers.h +++ b/include/lib/pmf/pmf_helpers.h @@ -173,7 +173,7 @@ typedef struct pmf_svc_desc { unsigned int tid, \ unsigned long long ts) \ { \ - CASSERT(_flags, select_proper_config); \ + CASSERT(_flags != 0, select_proper_config); \ PMF_VALIDATE_TID(_name, tid); \ uintptr_t base_addr = (uintptr_t) pmf_ts_mem_ ## _name; \ if (((_flags) & PMF_STORE_ENABLE) != 0) \ @@ -185,7 +185,7 @@ typedef struct pmf_svc_desc { unsigned int tid, \ unsigned long long ts) \ { \ - CASSERT(_flags, select_proper_config); \ + CASSERT(_flags != 0, select_proper_config); \ PMF_VALIDATE_TID(_name, tid); \ uintptr_t base_addr = (uintptr_t) pmf_ts_mem_ ## _name; \ if (((_flags) & PMF_STORE_ENABLE) != 0) \ |