aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMadhukar Pappireddy <madhukar.pappireddy@arm.com>2019-12-23 14:49:52 -0600
committerMadhukar Pappireddy <madhukar.pappireddy@arm.com>2020-01-28 11:09:02 -0600
commitca661a0092c8ead5ac7df57c55fffcc835d9c0b9 (patch)
treedfe7b9c1c229eb82c0561d7061b1554a5045b32d /docs
parent29763ac260d379c425650c6bf2256fcd5e045437 (diff)
downloadplatform_external_arm-trusted-firmware-ca661a0092c8ead5ac7df57c55fffcc835d9c0b9.tar.gz
platform_external_arm-trusted-firmware-ca661a0092c8ead5ac7df57c55fffcc835d9c0b9.tar.bz2
platform_external_arm-trusted-firmware-ca661a0092c8ead5ac7df57c55fffcc835d9c0b9.zip
Enable -Wredundant-decls warning check
This flag warns if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing. Consequently, this patch also fixes the issues reported by this flag. Consider the following two lines of code from two different source files(bl_common.h and bl31_plat_setup.c): IMPORT_SYM(uintptr_t, __RO_START__, BL_CODE_BASE); IMPORT_SYM(unsigned long, __RO_START__, BL2_RO_BASE); The IMPORT_SYM macro which actually imports a linker symbol as a C expression. The macro defines the __RO_START__ as an extern variable twice, one for each instance. __RO_START__ symbol is defined by the linker script to mark the start of the Read-Only area of the memory map. Essentially, the platform code redefines the linker symbol with a different (relevant) name rather than using the standard symbol. A simple solution to fix this issue in the platform code for redundant declarations warning is to remove the second IMPORT_SYM and replace it with following assignment static const unsigned long BL2_RO_BASE = BL_CODE_BASE; Change-Id: If4835d1ee462d52b75e5afd2a59b64828707c5aa Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions