everywhere: Use correct macro for gcc-specific warnings
Many warnings were disabled for all compilers, even though they are gcc-specific warnings. Now that clang has -Wunknown-warning-option enabled, this can cause compilation failures when building with clang toolchains. Use TOOLCHAIN_DISABLE_GCC_WARNING for all gcc-specific macros. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html https://clang.llvm.org/docs/DiagnosticsReference.html Fixes: #84138 Signed-off-by: Tom Hughes <tomhughes@chromium.org>
This commit is contained in:
parent
11d70c61e5
commit
15411747e7
8 changed files with 20 additions and 19 deletions
|
@ -19,7 +19,7 @@ volatile unsigned int changed;
|
|||
* The `alternate_thread` function deliberately makes use of a dangling pointer
|
||||
* in order to test stack randomisation.
|
||||
*/
|
||||
TOOLCHAIN_DISABLE_WARNING(TOOLCHAIN_WARNING_DANGLING_POINTER)
|
||||
TOOLCHAIN_DISABLE_GCC_WARNING(TOOLCHAIN_WARNING_DANGLING_POINTER)
|
||||
|
||||
void alternate_thread(void *p1, void *p2, void *p3)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ void alternate_thread(void *p1, void *p2, void *p3)
|
|||
last_sp = sp_val;
|
||||
}
|
||||
|
||||
TOOLCHAIN_ENABLE_WARNING(TOOLCHAIN_WARNING_DANGLING_POINTER)
|
||||
TOOLCHAIN_ENABLE_GCC_WARNING(TOOLCHAIN_WARNING_DANGLING_POINTER)
|
||||
|
||||
K_THREAD_STACK_DEFINE(alt_thread_stack_area, STACKSIZE);
|
||||
static struct k_thread alt_thread_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue