Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable -Wundef on Linux and Android. #29610

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ config("strict_warnings") {
# we can. Ideally this would be checking chip_device_platform or so
# to be more fine-grained than current_os, but it's not clear that
# we can access that here.
if (current_os != "android" && current_os != "freertos" &&
current_os != "linux" && current_os != "mbed" && current_os != "zephyr" &&
if (current_os != "freertos" && current_os != "mbed" &&
current_os != "zephyr" &&
# cmsis-rtos is OpenIOT
current_os != "cmsis-rtos" &&
# cyw30739 is one of the Infineon builds
Expand Down
6 changes: 3 additions & 3 deletions src/controller/java/AndroidCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#include "AndroidCallbacks.h"
#include <controller/java/AndroidControllerExceptions.h>
#if USE_JAVA_TLV_ENCODE_DECODE
#ifdef USE_JAVA_TLV_ENCODE_DECODE
#include <controller/java/CHIPAttributeTLVValueDecoder.h>
#include <controller/java/CHIPEventTLVValueDecoder.h>
#endif
Expand Down Expand Up @@ -384,7 +384,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat
readerForJavaTLV.Init(*apData);

jobject value = nullptr;
#if USE_JAVA_TLV_ENCODE_DECODE
#ifdef USE_JAVA_TLV_ENCODE_DECODE
TLV::TLVReader readerForJavaObject;
readerForJavaObject.Init(*apData);

Expand Down Expand Up @@ -518,7 +518,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV
}

jobject value = nullptr;
#if USE_JAVA_TLV_ENCODE_DECODE
#ifdef USE_JAVA_TLV_ENCODE_DECODE
TLV::TLVReader readerForJavaObject;
readerForJavaObject.Init(*apData);
value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err);
Expand Down
5 changes: 4 additions & 1 deletion src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {
defines += [ "CHIP_DEVICE_LAYER_TARGET=fake" ]
} else if (chip_device_platform == "android") {
device_layer_target_define = "ANDROID"
defines += [ "CHIP_DEVICE_LAYER_TARGET=android" ]
defines += [
"CHIP_DEVICE_LAYER_TARGET=android",
"CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
]
} else if (chip_device_platform == "ameba") {
device_layer_target_define = "AMEBA"
defines += [
Expand Down
2 changes: 2 additions & 0 deletions third_party/mbedtls/mbedtls.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ template("mbedtls_target") {
"-Wno-unused-but-set-parameter",
"-Wno-format-nonliteral", # Because of mbedtls_debug_print_msg
"-Wno-conversion", # Lots of -Wconversion warnings, sadly.
"-Wno-undef", # At least MBEDTLS_AESNI_HAVE_CODE is used without being
# defined.
]

if (is_clang) {
Expand Down