IAR: Suppress C "bypasses initialization" warning

By default IAR generates "transfer of control bypasses initialization"
warnings for C code - it's a legal construct that frequently occurs when
doing Linux-style "goto error". Many occurrences in Nanostack.

Suppress the warning for C only, to align with GCC and ARMCC. Have to
take care not to put it in the "common" section, as this would suppress
it for C++, where it actually is illegal.
pull/7261/head
Kevin Bracey 2018-06-19 15:54:28 +03:00
parent 5d8570be39
commit 81ed8014cd
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-On", "-r", "-DMBED_DEBUG",
"-DMBED_TRAP_ERRORS_ENABLED=1", "--enable_restrict", "-D_RTE_"],
"asm": [],
"c": ["--vla"],
"c": ["--vla", "--diag_suppress=Pe546"],
"cxx": ["--guard_calls", "--no_static_destruction"],
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
}

View File

@ -48,7 +48,7 @@
"--no_wrap_diagnostics", "-e",
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh", "--enable_restrict", "-D_RTE_"],
"asm": [],
"c": ["--vla"],
"c": ["--vla", "--diag_suppress=Pe546"],
"cxx": ["--guard_calls", "--no_static_destruction"],
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
}

View File

@ -48,7 +48,7 @@
"--no_wrap_diagnostics", "-e",
"--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "-DNDEBUG", "--enable_restrict", "-D_RTE_"],
"asm": [],
"c": ["--vla"],
"c": ["--vla", "--diag_suppress=Pe546"],
"cxx": ["--guard_calls", "--no_static_destruction"],
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
}