From 2d07e2182a49e09fc243c13cb411ff0867353d51 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 6 Oct 2023 11:36:13 +0200 Subject: [PATCH] [Tizen] Make sure that all used defines are defined (#29607) * Remove unused defines * Do not leave undefined defines * Add missing include * Remove Tizen from exception --- build/config/compiler/BUILD.gn | 3 +-- examples/platform/tizen/OptionsProxy.cpp | 1 + src/platform/Beken/CHIPDevicePlatformConfig.h | 1 - src/platform/Tizen/CHIPDevicePlatformConfig.h | 7 +++++-- src/platform/Tizen/NetworkCommissioningDriver.h | 2 ++ src/platform/mt793x/CHIPDevicePlatformConfig.h | 2 -- src/platform/nxp/mw320/CHIPDevicePlatformConfig.h | 5 ----- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 9f34a730563d4a..4d729d76f6e07c 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -258,8 +258,7 @@ config("strict_warnings") { # 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" && + current_os != "linux" && current_os != "mbed" && current_os != "zephyr" && # cmsis-rtos is OpenIOT current_os != "cmsis-rtos" && # cyw30739 is one of the Infineon builds diff --git a/examples/platform/tizen/OptionsProxy.cpp b/examples/platform/tizen/OptionsProxy.cpp index 158d0343f2b066..f970887ba140b1 100644 --- a/examples/platform/tizen/OptionsProxy.cpp +++ b/examples/platform/tizen/OptionsProxy.cpp @@ -22,6 +22,7 @@ #include +#include #include namespace { diff --git a/src/platform/Beken/CHIPDevicePlatformConfig.h b/src/platform/Beken/CHIPDevicePlatformConfig.h index 78050497555796..0b577345fb141c 100755 --- a/src/platform/Beken/CHIPDevicePlatformConfig.h +++ b/src/platform/Beken/CHIPDevicePlatformConfig.h @@ -67,4 +67,3 @@ #define CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY 2 #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 -#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 diff --git a/src/platform/Tizen/CHIPDevicePlatformConfig.h b/src/platform/Tizen/CHIPDevicePlatformConfig.h index cf54ede61d5909..110f383e16f6d1 100644 --- a/src/platform/Tizen/CHIPDevicePlatformConfig.h +++ b/src/platform/Tizen/CHIPDevicePlatformConfig.h @@ -36,11 +36,14 @@ #if CHIP_ENABLE_OPENTHREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 -#define CHIP_DEVICE_CONFIG_ENABLE_DNSSD 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 -#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 +#else +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 0 +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 0 #endif #ifndef CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/Tizen/NetworkCommissioningDriver.h b/src/platform/Tizen/NetworkCommissioningDriver.h index 6654cbd0dc7930..cdd0ceecd2abd2 100644 --- a/src/platform/Tizen/NetworkCommissioningDriver.h +++ b/src/platform/Tizen/NetworkCommissioningDriver.h @@ -22,6 +22,8 @@ #include +#include "CHIPDevicePlatformConfig.h" + namespace chip { namespace DeviceLayer { namespace NetworkCommissioning { diff --git a/src/platform/mt793x/CHIPDevicePlatformConfig.h b/src/platform/mt793x/CHIPDevicePlatformConfig.h index 9e082811317902..2b5a03207cec3f 100644 --- a/src/platform/mt793x/CHIPDevicePlatformConfig.h +++ b/src/platform/mt793x/CHIPDevicePlatformConfig.h @@ -39,11 +39,9 @@ #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 -#define CHIP_DEVICE_CONFIG_ENABLE_DNSSD 1 #endif /* CHIP_ENABLE_OPENTHREAD */ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 -#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 #ifndef CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 diff --git a/src/platform/nxp/mw320/CHIPDevicePlatformConfig.h b/src/platform/nxp/mw320/CHIPDevicePlatformConfig.h index 678695e9b304c6..8806abb7d61db0 100644 --- a/src/platform/nxp/mw320/CHIPDevicePlatformConfig.h +++ b/src/platform/nxp/mw320/CHIPDevicePlatformConfig.h @@ -59,8 +59,3 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY 0 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY 0 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL 0 - -// mdns/mdns_sd ++ -// #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 -#define CHIP_DEVICE_CONFIG_ENABLE_DNSSD 1 -// mdns/dns_sd --