]> git.baikalelectronics.ru Git - arm-tf.git/commit
Fix 'tautological-constant-compare' error
authorManish V Badarkhe <Manish.Badarkhe@arm.com>
Sun, 22 Mar 2020 04:23:24 +0000 (04:23 +0000)
committerManish V Badarkhe <Manish.Badarkhe@arm.com>
Wed, 25 Mar 2020 13:58:55 +0000 (13:58 +0000)
commit4c4a1327ae5efc360a98f6be6839ac3652d63fb2
tree5b75431e2c46bfbb761662d77beddfab92ee7f5c
parent92ce719b559146b038d69940aff181c0a8b461fd
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
include/lib/pmf/pmf_helpers.h