summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-06-27 17:53:42 +0700
committerhathach <[email protected]>2022-06-27 17:53:42 +0700
commitdd7a17c34511e79bc259634f4fa157e7ddf98fd1 (patch)
tree3c1209098ba2f54de2ae2df72b112db77f2a59cf /examples
parenta0ef4898906a5985deae11e5539a942885398ca1 (diff)
prevent error on specific warnings for net lwip & dual example for rp2040
Diffstat (limited to 'examples')
-rw-r--r--examples/device/net_lwip_webserver/CMakeLists.txt6
-rw-r--r--examples/dual/host_hid_to_device_cdc/CMakeLists.txt15
2 files changed, 19 insertions, 2 deletions
diff --git a/examples/device/net_lwip_webserver/CMakeLists.txt b/examples/device/net_lwip_webserver/CMakeLists.txt
index 5bb091a4f..beaa9ad99 100644
--- a/examples/device/net_lwip_webserver/CMakeLists.txt
+++ b/examples/device/net_lwip_webserver/CMakeLists.txt
@@ -72,6 +72,12 @@ if (EXISTS ${TOP}/lib/lwip/src)
# Example common such as compiler warnings
include(${CMAKE_CURRENT_SOURCE_DIR}/../../example.cmake)
+ # due to warnings from other net source, we need to prevent error from some of the warnings options
+ target_compile_options(${PROJECT} PUBLIC
+ -Wno-error=null-dereference
+ -Wno-error=conversion
+ )
+
# Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT})
diff --git a/examples/dual/host_hid_to_device_cdc/CMakeLists.txt b/examples/dual/host_hid_to_device_cdc/CMakeLists.txt
index cd6f16339..909ee423f 100644
--- a/examples/dual/host_hid_to_device_cdc/CMakeLists.txt
+++ b/examples/dual/host_hid_to_device_cdc/CMakeLists.txt
@@ -24,8 +24,19 @@ target_include_directories(${PROJECT} PUBLIC
)
# Example common such as compiler warnings
-# skip extra warnings since pio-usb still has some warnings to fix
-#include(${CMAKE_CURRENT_SOURCE_DIR}/../../example.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../../example.cmake)
+
+# due to warnings from other net source, we need to prevent error from some of the warnings options
+target_compile_options(${PROJECT} PUBLIC
+ -Wno-error=shadow
+ -Wno-error=cast-align
+ -Wno-error=cast-qual
+ -Wno-error=redundant-decls
+ -Wno-error=sign-conversion
+ -Wno-error=conversion
+ -Wno-error=sign-compare
+ -Wno-error=unused-function
+ )
# Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details.