diff options
author | TTornblom <thomas.tornblom@iar.com> | 2020-03-04 17:56:27 +0100 |
---|---|---|
committer | TTornblom <thomas.tornblom@iar.com> | 2020-04-23 13:06:20 +0200 |
commit | faf74f575a7edf7410ade35ceb79cd7a63b3dc02 (patch) | |
tree | 102cd919fdd3e90712b47486a68dfe72004309c7 /CommonConfig.cmake | |
parent | b9e5ed000321d757b7ef2e59d2fabc8af60f0a53 (diff) | |
download | trusted-firmware-m-faf74f575a7edf7410ade35ceb79cd7a63b3dc02.tar.gz |
Build: Major warnings cleanup
This is a major type-mismatch cleanup and warnings elimination.
The IAR toolchain runs with more warnings enabled than ARMCLANG or
GNUARM, which has resulted in this effort.
This should make it easier to enable "pedantic" mode also for GNUARM.
There are still a few warnings about jumping past variable
initialization and falling off the end of non-void functions, but there
are comments in some of these parts that implies that this is done to
catch programming errors, like having case labels for all possible enum
values.
Reordered initializer in tfm_attestation_req_mngr.c to eliminate CI
warning.
Disabled "Pe940" warnings in CommonConfig.cmake to suppress warnings
about inline assembly functions declared to return value that doesn't
declare a return value in the __ASM() statement.
Disabled "Pe546" warnings to supress warnings about jumping over
unused initializers.
Fixed what appears to be a copy/paste bug in tfm_ss_core_test.c.
Removed unused variable "ret" in Driver_PPC.c for AN519 and AN521, to
make it similar to AN524.
Signed-off-by: TTornblom <thomas.tornblom@iar.com>
Change-Id: I2b729c73e4b004cff6b0530cc1350fcf900e4272
Diffstat (limited to 'CommonConfig.cmake')
-rw-r--r-- | CommonConfig.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CommonConfig.cmake b/CommonConfig.cmake index 0763abceb3..86a7bf9591 100644 --- a/CommonConfig.cmake +++ b/CommonConfig.cmake @@ -137,7 +137,7 @@ elseif(${COMPILER} STREQUAL "IARARM") include("Common/FindIARARM") include("Common/${IARARM_MODULE}") - set (COMMON_COMPILE_FLAGS -e --dlib_config=full --vla --silent -DNO_TYPEOF ${CMSE_FLAGS}) + set (COMMON_COMPILE_FLAGS -e --dlib_config=full --vla --silent -DNO_TYPEOF ${CMSE_FLAGS} --diag_suppress Pe546,Pe940) ##Shared compiler and linker settings. function(config_setting_shared_compiler_flags tgt) embedded_set_target_compile_flags(TARGET ${tgt} LANGUAGE C FLAGS ${COMMON_COMPILE_FLAGS} "-DImage$$= " "-DLoad$$LR$$= " "-D$$ZI$$Base=$$Base" "-D$$ZI$$Limit=$$Limit" "-D$$RO$$Base=$$Base" "-D$$RO$$Limit=$$Limit" "-D$$RW$$Base=$$Base" "-D$$RW$$Limit=$$Limit" "-D_DATA$$RW$$Base=_DATA$$Base" "-D_DATA$$RW$$Limit=_DATA$$Limit" "-D_DATA$$ZI$$Base=_DATA$$Base" "-D_DATA$$ZI$$Limit=_DATA$$Limit" "-D_STACK$$ZI$$Base=_STACK$$Base" "-D_STACK$$ZI$$Limit=_STACK$$Limit" ) |