You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/02 13:10:30 UTC

(nuttx-apps) 03/03: kasantest: Fix compilation warning

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 8d1966e9fcbbfea9d4c804a89e683c1c6c57d8a9
Author: W-M-R <Mi...@163.com>
AuthorDate: Wed Oct 2 11:33:46 2024 +0800

    kasantest: Fix compilation warning
    
    signed-off-by: W-M-R <Mi...@163.com>
---
 testing/kasantest/CMakeLists.txt | 11 +++++++++--
 testing/kasantest/Makefile       |  4 ++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/testing/kasantest/CMakeLists.txt b/testing/kasantest/CMakeLists.txt
index 58ec8426e..8a06a10ea 100644
--- a/testing/kasantest/CMakeLists.txt
+++ b/testing/kasantest/CMakeLists.txt
@@ -19,7 +19,14 @@
 # ##############################################################################
 
 if(CONFIG_TESTING_KASAN)
-  set(CFLAGS -Wno-error -Wno-use-after-free -Wno-array-bounds
-             -Wno-free-nonheap-object -Wno-stringop-overflow "-O0")
+  set(CFLAGS
+      -Wno-error
+      -Wno-use-after-free
+      -Wno-array-bounds
+      -Wno-unused-value
+      -Wno-unused-variable
+      -Wno-free-nonheap-object
+      -Wno-stringop-overflow
+      "-O0")
   nuttx_add_application(NAME kasantest COMPILE_FLAGS ${CFLAGS} SRCS kasantest.c)
 endif()
diff --git a/testing/kasantest/Makefile b/testing/kasantest/Makefile
index 9a84beeee..21b766a10 100644
--- a/testing/kasantest/Makefile
+++ b/testing/kasantest/Makefile
@@ -27,9 +27,9 @@ PROGNAME  = kasantest
 PRIORITY  = $(CONFIG_TESTING_KASAN_PRIORITY)
 STACKSIZE = $(CONFIG_TESTING_KASAN_STACKSIZE)
 
-CFLAGS += -Wno-error -Wno-use-after-free
+CFLAGS += -Wno-error -Wno-use-after-free -Wno-stringop-overflow
 CFLAGS += -Wno-array-bounds -Wno-free-nonheap-object
-CFLAGS += -Wno-stringop-overflow
+CFLAGS += -Wno-unused-value -Wno-unused-variable
 CFLAGS += "-O0"
 
 include $(APPDIR)/Application.mk