From 32b307aa5a1f62b4d86226cfdb1a6eb63425c84d Mon Sep 17 00:00:00 2001 From: deyritwika Date: Fri, 30 Sep 2022 11:35:59 -0700 Subject: [PATCH] [Infineon] Code Cleanup and Fix for Build Clean --- examples/lock-app/infineon/psoc6/src/AppTask.cpp | 1 - scripts/build/build/__init__.py | 3 ++- .../Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp | 2 +- src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index b0dbc3e26d6a3e..ad532c6707f72e 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -21,7 +21,6 @@ #include "AppEvent.h" #include "ButtonHandler.h" #include "LEDWidget.h" -#include "qrcodegen.h" #include #include #include diff --git a/scripts/build/build/__init__.py b/scripts/build/build/__init__.py index 6d85fd8b12c3a3..c8c7cafeb8dd0c 100644 --- a/scripts/build/build/__init__.py +++ b/scripts/build/build/__init__.py @@ -68,7 +68,8 @@ def Build(self): def CleanOutputDirectories(self): for builder in self.builders: logging.warn('Cleaning %s', builder.output_dir) - shutil.rmtree(builder.output_dir) + if os.path.exists(builder.output_dir): + shutil.rmtree(builder.output_dir) # any generated output was cleaned self.completed_steps.discard(BuildSteps.GENERATED) diff --git a/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp index 0379d62a630071..11919deab2b26e 100644 --- a/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/Infineon/PSOC6/DeviceNetworkProvisioningDelegateImpl.cpp @@ -19,7 +19,7 @@ #include #include "DeviceNetworkProvisioningDelegateImpl.h" -#include "platform/Infineon/PSOC6/P6Utils.h" +#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp index b91ae117dec22d..76cbd5fc1ab6ef 100644 --- a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp @@ -250,7 +250,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wiFiVersion) whd_security_t security; cy_rslt_t result = CY_RSLT_SUCCESS; - if (whd_wifi_get_ap_info(whd_ifs[CY_WCM_INTERFACE_TYPE_STA], &bss_info, &security) != CY_RSLT_SUCCESS) + result = whd_wifi_get_ap_info(whd_ifs[CY_WCM_INTERFACE_TYPE_STA], &bss_info, &security); + if (result != CY_RSLT_SUCCESS) { ChipLogError(DeviceLayer, "whd_wifi_get_ap_info failed: %d", (int) result); SuccessOrExit(CHIP_ERROR_INTERNAL);