Skip to content

Commit

Permalink
Enable -Wundef on Linux and Android.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Oct 6, 2023
1 parent ccdbfee commit 1352513
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +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 != "tizen" &&
current_os != "zephyr" &&
if (current_os != "freertos" && current_os != "mbed" &&
current_os != "tizen" && 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

0 comments on commit 1352513

Please sign in to comment.