diff --git a/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp b/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp index c9722c3e6fb8b2..50e6d11db53c25 100644 --- a/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp @@ -28,12 +28,12 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include #include #include #include -#include using namespace ::chip; using namespace ::chip::Credentials; diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 55107d380a555f..ac3426f4b438cc 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp b/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp index 4c1b55fbddb9fc..ed88297b6bb515 100644 --- a/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp @@ -28,9 +28,9 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include -#include using namespace ::chip; diff --git a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp index 870870bbf41999..bc297dfa3d426b 100644 --- a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp index ca044c2a822aff..caa4690eb0e25c 100644 --- a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp +++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp @@ -29,9 +29,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.h b/examples/bridge-app/asr/subdevice/SubDeviceManager.h index 6885f3492a6cc7..3a91527f33e99c 100644 --- a/examples/bridge-app/asr/subdevice/SubDeviceManager.h +++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.h @@ -29,9 +29,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/examples/bridge-app/asr/subdevice/subdevice_test.cpp b/examples/bridge-app/asr/subdevice/subdevice_test.cpp index 652f361db682a9..7691b5c11dc707 100644 --- a/examples/bridge-app/asr/subdevice/subdevice_test.cpp +++ b/examples/bridge-app/asr/subdevice/subdevice_test.cpp @@ -29,9 +29,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/examples/chef/ameba/main/CHIPDeviceManager.cpp b/examples/chef/ameba/main/CHIPDeviceManager.cpp index 4c1b55fbddb9fc..ed88297b6bb515 100644 --- a/examples/chef/ameba/main/CHIPDeviceManager.cpp +++ b/examples/chef/ameba/main/CHIPDeviceManager.cpp @@ -28,9 +28,9 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include -#include using namespace ::chip; diff --git a/examples/chef/ameba/main/chipinterface.cpp b/examples/chef/ameba/main/chipinterface.cpp index 7e52ae210e3ded..ad9946ef5a3719 100644 --- a/examples/chef/ameba/main/chipinterface.cpp +++ b/examples/chef/ameba/main/chipinterface.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp index 24d3f4cf4af629..a3656550b9434c 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -20,7 +20,7 @@ #include "AppEvent.h" #include #include -#include +#include #include #include @@ -425,7 +425,7 @@ void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action) void AppTask::KBD_Callback(uint8_t events) { - eventMask = eventMask | (uint32_t)(1 << events); + eventMask = eventMask | (uint32_t) (1 << events); HandleKeyboard(); } diff --git a/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp index c9722c3e6fb8b2..50e6d11db53c25 100644 --- a/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp @@ -28,12 +28,12 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include #include #include #include -#include using namespace ::chip; using namespace ::chip::Credentials; diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp index 81cb25a2db011c..98bf21626b87a1 100644 --- a/examples/light-switch-app/ameba/main/chipinterface.cpp +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp b/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp index 5ec1473adf28cd..c2d9d13d9a91a7 100644 --- a/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp @@ -26,12 +26,12 @@ #include "CHIPDeviceManager.h" #include +#include #include #include #include #include #include -#include #include "Globals.h" #include "LEDWidget.h" diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index 4b342b4b413578..1f05a9edb5b58e 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/lighting-app/beken/main/chipinterface.cpp b/examples/lighting-app/beken/main/chipinterface.cpp index 8ad5a5c45ced1a..69111dea792b1c 100644 --- a/examples/lighting-app/beken/main/chipinterface.cpp +++ b/examples/lighting-app/beken/main/chipinterface.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 8bbddd6b47774f..9a2b6a71e7fa80 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -33,9 +33,9 @@ #include #include #include +#include #include #include -#include #include #ifdef CONFIG_CHIP_WIFI diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index cb6a5d53f3a2bd..02656ae62299c7 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -20,7 +20,7 @@ #include "AppEvent.h" #include #include -#include +#include #include #include @@ -427,7 +427,7 @@ void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action) void AppTask::KBD_Callback(uint8_t events) { - eventMask = eventMask | (uint32_t)(1 << events); + eventMask = eventMask | (uint32_t) (1 << events); } void AppTask::HandleKeyboard(void) diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 3ef85657363043..4eecd0b6702c76 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -31,9 +31,9 @@ #include #include #include +#include #include #include -#include #include #ifdef CONFIG_CHIP_WIFI diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index e8513334fb96d7..fff749b311678e 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -20,7 +20,7 @@ #include "AppEvent.h" #include #include -#include +#include #include #include @@ -323,7 +323,7 @@ void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action) void AppTask::KBD_Callback(uint8_t events) { - eventMask = eventMask | (uint32_t)(1 << events); + eventMask = eventMask | (uint32_t) (1 << events); HandleKeyboard(); } diff --git a/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp b/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp index c9722c3e6fb8b2..50e6d11db53c25 100644 --- a/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp @@ -28,12 +28,12 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include #include #include #include -#include using namespace ::chip; using namespace ::chip::Credentials; diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index ee8e80086fbca4..841e95c1720df8 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/persistent-storage/KeyValueStorageTest.cpp b/examples/persistent-storage/KeyValueStorageTest.cpp index 8c039bddf1fda5..3adcd955d73b5b 100644 --- a/examples/persistent-storage/KeyValueStorageTest.cpp +++ b/examples/persistent-storage/KeyValueStorageTest.cpp @@ -21,8 +21,8 @@ #include #include +#include #include -#include #include #include diff --git a/examples/persistent-storage/esp32/main/main.cpp b/examples/persistent-storage/esp32/main/main.cpp index b107056fbd8fa2..64053a79e31887 100644 --- a/examples/persistent-storage/esp32/main/main.cpp +++ b/examples/persistent-storage/esp32/main/main.cpp @@ -20,7 +20,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "nvs_flash.h" -#include +#include #include const char * TAG = "persistent-storage"; diff --git a/examples/platform/asr/CHIPDeviceManager.cpp b/examples/platform/asr/CHIPDeviceManager.cpp old mode 100755 new mode 100644 index 98ebda9a85134d..9d190400c53aa7 --- a/examples/platform/asr/CHIPDeviceManager.cpp +++ b/examples/platform/asr/CHIPDeviceManager.cpp @@ -28,9 +28,9 @@ #include #include #include +#include #include #include -#include #ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER #include diff --git a/examples/platform/beken/common/CHIPDeviceManager.cpp b/examples/platform/beken/common/CHIPDeviceManager.cpp index fb54438c5a716b..5ee110ed372c7e 100644 --- a/examples/platform/beken/common/CHIPDeviceManager.cpp +++ b/examples/platform/beken/common/CHIPDeviceManager.cpp @@ -27,9 +27,9 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include -#include #include using namespace ::chip; diff --git a/examples/platform/esp32/common/CHIPDeviceManager.cpp b/examples/platform/esp32/common/CHIPDeviceManager.cpp index 037ca40f2c0c3b..fb8d22094cf0a0 100644 --- a/examples/platform/esp32/common/CHIPDeviceManager.cpp +++ b/examples/platform/esp32/common/CHIPDeviceManager.cpp @@ -27,9 +27,9 @@ #include "CHIPDeviceManager.h" #include #include +#include #include #include -#include #include #include "esp_log.h" diff --git a/examples/platform/nrfconnect/util/test/TestInetCommon.cpp b/examples/platform/nrfconnect/util/test/TestInetCommon.cpp index 4c6ad877fd7bda..ff73f9ba81d097 100644 --- a/examples/platform/nrfconnect/util/test/TestInetCommon.cpp +++ b/examples/platform/nrfconnect/util/test/TestInetCommon.cpp @@ -43,8 +43,8 @@ #include #include +#include #include -#include #include #if CHIP_SYSTEM_CONFIG_USE_SOCKETS diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/CHIPDeviceManager.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/CHIPDeviceManager.cpp index 9c1894abc0bd80..11a8fbbd69b2a6 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/CHIPDeviceManager.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/CHIPDeviceManager.cpp @@ -29,9 +29,9 @@ #include #include +#include #include #include -#include #include using namespace ::chip; diff --git a/examples/pump-app/cc13x4_26x4/main/CHIPDeviceManager.cpp b/examples/pump-app/cc13x4_26x4/main/CHIPDeviceManager.cpp index 9c1894abc0bd80..11a8fbbd69b2a6 100644 --- a/examples/pump-app/cc13x4_26x4/main/CHIPDeviceManager.cpp +++ b/examples/pump-app/cc13x4_26x4/main/CHIPDeviceManager.cpp @@ -29,9 +29,9 @@ #include #include +#include #include #include -#include #include using namespace ::chip; diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index b2406ed56cf29d..f1d9dd6b7f358b 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -30,9 +30,9 @@ #include #include #include +#include #include #include -#include #include #if CONFIG_CHIP_OTA_REQUESTOR diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 9b00a541cada3b..07d85d9f2b330b 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -30,9 +30,9 @@ #include #include #include +#include #include #include -#include #include #if CONFIG_CHIP_OTA_REQUESTOR diff --git a/examples/shell/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/shell/cc13x2x7_26x2x7/main/AppTask.cpp index dda97f4e566ef5..0c30a0e34c55fb 100644 --- a/examples/shell/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/shell/cc13x2x7_26x2x7/main/AppTask.cpp @@ -19,7 +19,7 @@ #include "AppTask.h" #include -#include +#include #include "FreeRTOS.h" diff --git a/examples/shell/cc13x4_26x4/main/AppTask.cpp b/examples/shell/cc13x4_26x4/main/AppTask.cpp index 302f8b8baf8c96..1ae57e8cc471b8 100644 --- a/examples/shell/cc13x4_26x4/main/AppTask.cpp +++ b/examples/shell/cc13x4_26x4/main/AppTask.cpp @@ -18,7 +18,7 @@ #include "AppTask.h" #include -#include +#include #include "FreeRTOS.h" diff --git a/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp b/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp index ac98d19eb0d574..23f1417ed8aeb1 100644 --- a/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp @@ -19,7 +19,7 @@ #include "AppTask.h" #include "AppEvent.h" #include -#include +#include #include #include @@ -246,7 +246,7 @@ void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action) void AppTask::KBD_Callback(uint8_t events) { - eventMask = eventMask | (uint32_t)(1 << events); + eventMask = eventMask | (uint32_t) (1 << events); HandleKeyboard(); } diff --git a/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja b/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja index 63d730f87a1a9d..439656e5376aec 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/CHIPReadCallbacks_h.jinja @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h index f338e7db9f28e2..d09b32303c11fe 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPReadReadCallbacks.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h index 35c84f3ef4c0dd..2a41d23939af0e 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPReadReadCallbacks.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h index 60383ba31b550d..81b4d9046949d8 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPReadReadCallbacks.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h index 60603103b8f692..35eb4e3e3115ec 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPReadReadCallbacks.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h index 60383ba31b550d..81b4d9046949d8 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPReadReadCallbacks.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/src/app/server/EchoHandler.cpp b/src/app/server/EchoHandler.cpp index 660c8a4a7ca1fb..2f9323426943b6 100644 --- a/src/app/server/EchoHandler.cpp +++ b/src/app/server/EchoHandler.cpp @@ -22,7 +22,7 @@ #include -#include +#include #include namespace { diff --git a/src/app/tests/AppTestContext.cpp b/src/app/tests/AppTestContext.cpp index abac16a531b090..ac81702d513aed 100644 --- a/src/app/tests/AppTestContext.cpp +++ b/src/app/tests/AppTestContext.cpp @@ -20,8 +20,8 @@ #include #include #include +#include #include -#include namespace { diff --git a/src/app/tests/TestAclAttribute.cpp b/src/app/tests/TestAclAttribute.cpp index 1f0e0c13f17023..9632062a0838fe 100644 --- a/src/app/tests/TestAclAttribute.cpp +++ b/src/app/tests/TestAclAttribute.cpp @@ -30,11 +30,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestAclEvent.cpp b/src/app/tests/TestAclEvent.cpp index fcb477761aa342..f7a83f98742908 100644 --- a/src/app/tests/TestAclEvent.cpp +++ b/src/app/tests/TestAclEvent.cpp @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 14418aecc2877a..718f7d38e567c2 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestEventLogging.cpp b/src/app/tests/TestEventLogging.cpp index 221dd3d9f1ff9f..7d1487ed92a559 100644 --- a/src/app/tests/TestEventLogging.cpp +++ b/src/app/tests/TestEventLogging.cpp @@ -30,13 +30,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestEventLoggingNoUTCTime.cpp b/src/app/tests/TestEventLoggingNoUTCTime.cpp index 80c4a5038c72de..e14c088b800faa 100644 --- a/src/app/tests/TestEventLoggingNoUTCTime.cpp +++ b/src/app/tests/TestEventLoggingNoUTCTime.cpp @@ -29,13 +29,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestEventOverflow.cpp b/src/app/tests/TestEventOverflow.cpp index 59478e1a2233ff..1bf95ee1ffe593 100644 --- a/src/app/tests/TestEventOverflow.cpp +++ b/src/app/tests/TestEventOverflow.cpp @@ -28,13 +28,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestFabricScopedEventLogging.cpp b/src/app/tests/TestFabricScopedEventLogging.cpp index 4258b3c775a9d5..b86632c699ca68 100644 --- a/src/app/tests/TestFabricScopedEventLogging.cpp +++ b/src/app/tests/TestFabricScopedEventLogging.cpp @@ -30,13 +30,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestInteractionModelEngine.cpp b/src/app/tests/TestInteractionModelEngine.cpp index a9a21071d25475..d34007c3344832 100644 --- a/src/app/tests/TestInteractionModelEngine.cpp +++ b/src/app/tests/TestInteractionModelEngine.cpp @@ -28,10 +28,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -72,7 +72,7 @@ void TestInteractionModelEngine::TestAttributePathParamsPushRelease(nlTestSuite TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), - app::reporting::GetDefaultReportScheduler()); + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ObjectList * attributePathParamsList = nullptr; AttributePathParams attributePathParams1; @@ -110,7 +110,7 @@ void TestInteractionModelEngine::TestRemoveDuplicateConcreteAttribute(nlTestSuit TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), - app::reporting::GetDefaultReportScheduler()); + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ObjectList * attributePathParamsList = nullptr; AttributePathParams attributePathParams1; @@ -235,7 +235,7 @@ void TestInteractionModelEngine::TestSubscriptionResumptionTimer(nlTestSuite * a TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), - app::reporting::GetDefaultReportScheduler()); + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); uint32_t timeTillNextResubscriptionMs; diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp index e224571a45780d..be2b65b3ebcab2 100644 --- a/src/app/tests/TestPowerSourceCluster.cpp +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -19,11 +19,11 @@ #include "lib/support/CHIPMem.h" #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 7a6c88d2f04341..7d7604b1175cce 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -36,11 +36,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestReportingEngine.cpp b/src/app/tests/TestReportingEngine.cpp index ddf793ec8880ae..ec7e816b2f89e5 100644 --- a/src/app/tests/TestReportingEngine.cpp +++ b/src/app/tests/TestReportingEngine.cpp @@ -28,10 +28,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -173,7 +173,7 @@ void TestReportingEngine::TestMergeOverlappedAttributePath(nlTestSuite * apSuite TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), - app::reporting::GetDefaultReportScheduler()); + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); AttributePathParams * clusterInfo = InteractionModelEngine::GetInstance()->GetReportingEngine().mGlobalDirtySet.CreateObject(); @@ -245,7 +245,7 @@ void TestReportingEngine::TestMergeAttributePathWhenDirtySetPoolExhausted(nlTest TestContext & ctx = *static_cast(apContext); CHIP_ERROR err = CHIP_NO_ERROR; err = InteractionModelEngine::GetInstance()->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), - app::reporting::GetDefaultReportScheduler()); + app::reporting::GetDefaultReportScheduler()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); InteractionModelEngine::GetInstance()->GetReportingEngine().mGlobalDirtySet.ReleaseAll(); diff --git a/src/app/tests/TestStatusIB.cpp b/src/app/tests/TestStatusIB.cpp index 0132c1ad589666..4ff97e4b7ccbc3 100644 --- a/src/app/tests/TestStatusIB.cpp +++ b/src/app/tests/TestStatusIB.cpp @@ -19,8 +19,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index 19d0d49c940ad9..1e10d45b814646 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -23,10 +23,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/src/app/tests/integration/MockEvents.cpp b/src/app/tests/integration/MockEvents.cpp index 62f8c83db83dd4..1883075c3ea5f8 100644 --- a/src/app/tests/integration/MockEvents.cpp +++ b/src/app/tests/integration/MockEvents.cpp @@ -27,7 +27,7 @@ #include "common.h" #include #include -#include +#include #include #include #include diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index 1353e211c0ac36..56cd7f37005ce5 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index b090425bebf093..e8fa74d9baa26c 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -35,9 +35,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/src/app/tests/integration/common.cpp b/src/app/tests/integration/common.cpp index 87627aeb9fddf0..647ac9be069bed 100644 --- a/src/app/tests/integration/common.cpp +++ b/src/app/tests/integration/common.cpp @@ -28,10 +28,10 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/src/ble/tests/TestBleErrorStr.cpp b/src/ble/tests/TestBleErrorStr.cpp index 9dc727a60347ee..aa71b8cfbca06f 100644 --- a/src/ble/tests/TestBleErrorStr.cpp +++ b/src/ble/tests/TestBleErrorStr.cpp @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 37536ff469c8df..9a59e89837329b 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -51,12 +51,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index e6392e8440739a..60a29f1afb2363 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #if CONFIG_DEVICE_LAYER diff --git a/src/controller/CommissioneeDeviceProxy.cpp b/src/controller/CommissioneeDeviceProxy.cpp index 89c237b5d46e7d..48ba4e4fd28552 100644 --- a/src/controller/CommissioneeDeviceProxy.cpp +++ b/src/controller/CommissioneeDeviceProxy.cpp @@ -32,8 +32,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 5f4f8dbb6a12be..b387d504aac54d 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -23,9 +23,9 @@ #endif #include #include +#include #include #include -#include #include #include #include diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 16c69e9f14d6aa..bca98e63ea177c 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -42,9 +42,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -917,7 +917,7 @@ JNI_METHOD(jbyteArray, createRootCertificate) if (fabricId != nullptr) { jlong jfabricId = chip::JniReferences::GetInstance().LongToPrimitive(fabricId); - fabric = MakeOptional(static_cast(jfabricId)); + fabric = MakeOptional(static_cast(jfabricId)); } { @@ -980,7 +980,7 @@ JNI_METHOD(jbyteArray, createIntermediateCertificate) if (fabricId != nullptr) { jlong jfabricId = chip::JniReferences::GetInstance().LongToPrimitive(fabricId); - fabric = MakeOptional(static_cast(jfabricId)); + fabric = MakeOptional(static_cast(jfabricId)); } { diff --git a/src/controller/python/chip/server/ServerInit.cpp b/src/controller/python/chip/server/ServerInit.cpp index b85db9f27b6b9d..611d4948ceb0b6 100644 --- a/src/controller/python/chip/server/ServerInit.cpp +++ b/src/controller/python/chip/server/ServerInit.cpp @@ -30,7 +30,7 @@ #include // #include -// #include +// #include // #include diff --git a/src/controller/tests/TestEventCaching.cpp b/src/controller/tests/TestEventCaching.cpp index 24a101aeeb95b8..1a9431fda9f0f4 100644 --- a/src/controller/tests/TestEventCaching.cpp +++ b/src/controller/tests/TestEventCaching.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp index 35b709f6e08f3e..543b02dbfcddf4 100644 --- a/src/controller/tests/TestEventChunking.cpp +++ b/src/controller/tests/TestEventChunking.cpp @@ -34,8 +34,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/src/controller/tests/TestEventNumberCaching.cpp b/src/controller/tests/TestEventNumberCaching.cpp index 982e98fcc2cc05..684e976f4c30cf 100644 --- a/src/controller/tests/TestEventNumberCaching.cpp +++ b/src/controller/tests/TestEventNumberCaching.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index d98d0586180940..c66b724b262667 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -966,7 +966,7 @@ void TestReadChunking::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void * a &readCallback, Instruction{ .chunksize = 2, .preworks = { WriteAttrOp(AttrOnEp5, 2), WriteAttrOp(AttrOnEp5, 2), - WriteAttrOp(AttrOnEp5, 2) }, + WriteAttrOp(AttrOnEp5, 2) }, .expectedValues = { { AttrOnEp5, 2 }, { AttrOnEp5, 2 }, { AttrOnEp5, 3 } }, .attributesWithSameDataVersion = { { AttrOnEp5, AttrOnEp5, AttrOnEp5 } } }); } @@ -1032,7 +1032,7 @@ void TestReadChunking::TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void * a DoTest(&readCallback, Instruction{ .chunksize = 1, .preworks = { WriteAttrOp(AttrOnEp5, 3), WriteAttrOp(AttrOnEp5, 3), - WriteAttrOp(AttrOnEp5, 3) }, + WriteAttrOp(AttrOnEp5, 3) }, .expectedValues = { { AttrOnEp5, 3 }, { AttrOnEp5, 3 }, { AttrOnEp5, 3 } } }); // The attribute failed to catch last report will be picked by this report. diff --git a/src/controller/tests/TestServerCommandDispatch.cpp b/src/controller/tests/TestServerCommandDispatch.cpp index 4754f754a28566..553bca4ad521a8 100644 --- a/src/controller/tests/TestServerCommandDispatch.cpp +++ b/src/controller/tests/TestServerCommandDispatch.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index 8f9fa06336b0da..6d3c7424dbb7dd 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -638,7 +638,7 @@ void TestWriteChunking::TestTransactionalList(nlTestSuite * apSuite, void * apCo RunTest(apSuite, ctx, Instructions{ .paths = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute), - ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute2) }, + ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute2) }, .expectedStatus = { true, true }, }); @@ -664,7 +664,7 @@ void TestWriteChunking::TestTransactionalList(nlTestSuite * apSuite, void * apCo RunTest(apSuite, ctx, Instructions{ .paths = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute), - ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) }, + ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) }, .data = { ListData::kNull, ListData::kList }, .expectedStatus = { true }, }); @@ -675,7 +675,7 @@ void TestWriteChunking::TestTransactionalList(nlTestSuite * apSuite, void * apCo RunTest(apSuite, ctx, Instructions{ .paths = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute), - ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) }, + ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) }, .data = { ListData::kList, ListData::kNull }, .expectedStatus = { true }, }); @@ -686,8 +686,8 @@ void TestWriteChunking::TestTransactionalList(nlTestSuite * apSuite, void * apCo RunTest(apSuite, ctx, Instructions{ .paths = { ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute), - ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute), - ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) }, + ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute), + ConcreteAttributePath(kTestEndpointId, Clusters::UnitTesting::Id, kTestListAttribute) }, .data = { ListData::kList, ListData::kNull, ListData::kList }, .expectedStatus = { true }, }); diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index 0cb30647b6da4e..249b2821f1f148 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -29,9 +29,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 59485d46cf971f..6d8f121637196c 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/controller/tests/data_model/TestWrite.cpp b/src/controller/tests/data_model/TestWrite.cpp index a24c3a2bcfdf4c..220e623ad9e176 100644 --- a/src/controller/tests/data_model/TestWrite.cpp +++ b/src/controller/tests/data_model/TestWrite.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index b81b8376fad974..4d81940f9b8549 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -28,11 +28,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm b/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm index 1027d0081af473..8e32bda547d753 100644 --- a/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm +++ b/src/darwin/Framework/CHIP/MTRClusterStateCacheContainer.mm @@ -27,7 +27,7 @@ #import "MTRLogging_Internal.h" #include -#include +#include #include using namespace chip; diff --git a/src/inet/tests/TestInetCommonPosix.cpp b/src/inet/tests/TestInetCommonPosix.cpp index 2eb5ec3ed125a6..4ffbc87a6458bc 100644 --- a/src/inet/tests/TestInetCommonPosix.cpp +++ b/src/inet/tests/TestInetCommonPosix.cpp @@ -47,8 +47,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/src/inet/tests/TestInetErrorStr.cpp b/src/inet/tests/TestInetErrorStr.cpp index 89ea47bb1daa12..3dee014648b439 100644 --- a/src/inet/tests/TestInetErrorStr.cpp +++ b/src/inet/tests/TestInetErrorStr.cpp @@ -37,8 +37,8 @@ #include #include +#include #include -#include #include #include diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn index 1f7f2769f3c5cd..dd03742071afb4 100644 --- a/src/lib/core/BUILD.gn +++ b/src/lib/core/BUILD.gn @@ -84,6 +84,20 @@ source_set("chip_config_header") { allow_circular_includes_from = [ "${chip_root}/src/ble:ble_config_header" ] } +source_set("error") { + sources = [ + "CHIPError.cpp", + "CHIPError.h", + "ErrorStr.cpp", + "ErrorStr.h", + ] + + public_deps = [ + ":chip_config_header", + "${chip_root}/src/lib/support:attributes", + ] +} + static_library("core") { output_name = "libChipCore" @@ -95,8 +109,6 @@ static_library("core") { "CHIPCallback.h", "CHIPCore.h", "CHIPEncoding.h", - "CHIPError.cpp", - "CHIPError.h", "CHIPKeyIds.cpp", "CHIPKeyIds.h", "ClusterEnums.h", @@ -124,6 +136,7 @@ static_library("core") { public_deps = [ ":chip_config_header", + ":error", "${chip_root}/src/ble", "${chip_root}/src/inet", "${chip_root}/src/lib/support", diff --git a/src/lib/core/CHIPError.cpp b/src/lib/core/CHIPError.cpp index 1b25f608b88a15..51db50cf14496a 100644 --- a/src/lib/core/CHIPError.cpp +++ b/src/lib/core/CHIPError.cpp @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include namespace chip { diff --git a/src/lib/support/ErrorStr.cpp b/src/lib/core/ErrorStr.cpp similarity index 98% rename from src/lib/support/ErrorStr.cpp rename to src/lib/core/ErrorStr.cpp index 6caf319c5e6b6a..f661cc85ed63aa 100644 --- a/src/lib/support/ErrorStr.cpp +++ b/src/lib/core/ErrorStr.cpp @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include namespace chip { diff --git a/src/lib/support/ErrorStr.h b/src/lib/core/ErrorStr.h similarity index 100% rename from src/lib/support/ErrorStr.h rename to src/lib/core/ErrorStr.h diff --git a/src/lib/core/tests/TestCHIPErrorStr.cpp b/src/lib/core/tests/TestCHIPErrorStr.cpp index 6686f8f1bfcf34..3e9f41a30a4fdd 100644 --- a/src/lib/core/tests/TestCHIPErrorStr.cpp +++ b/src/lib/core/tests/TestCHIPErrorStr.cpp @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 68b39ebb0a802b..cb6055f33376c6 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -106,8 +106,6 @@ static_library("support") { "DLLUtil.h", "DefaultStorageKeyAllocator.h", "Defer.h", - "ErrorStr.cpp", - "ErrorStr.h", "FibonacciUtils.cpp", "FibonacciUtils.h", "FixedBufferAllocator.cpp", @@ -172,6 +170,7 @@ static_library("support") { ":chip_version_header", ":logging_constants", "${chip_root}/src/lib/core:chip_config_header", + "${chip_root}/src/lib/core:error", "${chip_root}/src/platform:platform_buildconfig", "${chip_root}/src/platform/logging:headers", "${nlassert_root}:nlassert", diff --git a/src/lib/support/CodeUtils.h b/src/lib/support/CodeUtils.h index 4f393dfaad0b8b..e117f1bbaa0906 100644 --- a/src/lib/support/CodeUtils.h +++ b/src/lib/support/CodeUtils.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include /** diff --git a/src/lib/support/tests/TestErrorStr.cpp b/src/lib/support/tests/TestErrorStr.cpp index c39d355ae2efc4..78d5c63dc1f170 100644 --- a/src/lib/support/tests/TestErrorStr.cpp +++ b/src/lib/support/tests/TestErrorStr.cpp @@ -21,7 +21,7 @@ #include -#include +#include #include #include diff --git a/src/messaging/tests/MessagingContext.cpp b/src/messaging/tests/MessagingContext.cpp index 295518d0811006..f08b2d251bed2f 100644 --- a/src/messaging/tests/MessagingContext.cpp +++ b/src/messaging/tests/MessagingContext.cpp @@ -19,8 +19,8 @@ #include "system/SystemClock.h" #include +#include #include -#include #include namespace chip { diff --git a/src/messaging/tests/echo/common.cpp b/src/messaging/tests/echo/common.cpp index 146854083de2e9..80befc92d27ae6 100644 --- a/src/messaging/tests/echo/common.cpp +++ b/src/messaging/tests/echo/common.cpp @@ -26,7 +26,7 @@ #include "common.h" #include -#include +#include #include #include diff --git a/src/messaging/tests/echo/echo_requester.cpp b/src/messaging/tests/echo/echo_requester.cpp index d89a831b3efe60..44bf7379250ec9 100644 --- a/src/messaging/tests/echo/echo_requester.cpp +++ b/src/messaging/tests/echo/echo_requester.cpp @@ -30,7 +30,7 @@ #include "common.h" #include -#include +#include #include #include #include diff --git a/src/messaging/tests/echo/echo_responder.cpp b/src/messaging/tests/echo/echo_responder.cpp index fec18fd388f582..3cf56553294ccb 100644 --- a/src/messaging/tests/echo/echo_responder.cpp +++ b/src/messaging/tests/echo/echo_responder.cpp @@ -30,7 +30,7 @@ #include "common.h" #include -#include +#include #include #include #include diff --git a/src/platform/ASR/ASRUtils.cpp b/src/platform/ASR/ASRUtils.cpp index 1961de38e834bf..5ab810d85c4fb9 100644 --- a/src/platform/ASR/ASRUtils.cpp +++ b/src/platform/ASR/ASRUtils.cpp @@ -20,8 +20,8 @@ /* this file behaves like a config.h, comes first */ #include +#include #include -#include #include #include #include diff --git a/src/platform/Ameba/AmebaUtils.cpp b/src/platform/Ameba/AmebaUtils.cpp index c97db979bf2908..340a4eeae30cf8 100644 --- a/src/platform/Ameba/AmebaUtils.cpp +++ b/src/platform/Ameba/AmebaUtils.cpp @@ -23,8 +23,8 @@ #include #include +#include #include -#include #include #include #include @@ -197,7 +197,7 @@ CHIP_ERROR AmebaUtils::WiFiConnectProvisionedNetwork(void) GetWiFiConfig(config); ChipLogProgress(DeviceLayer, "Connecting to AP : [%s]", (char *) config->ssid); int32_t error = matter_wifi_connect((char *) config->ssid, RTW_SECURITY_WPA_WPA2_MIXED, (char *) config->password, - strlen((const char *) config->ssid), strlen((const char *) config->password), 0, nullptr); + strlen((const char *) config->ssid), strlen((const char *) config->password), 0, nullptr); CHIP_ERROR err = MapError(error, AmebaErrorType::kWiFiError); vPortFree(config); @@ -208,7 +208,7 @@ CHIP_ERROR AmebaUtils::WiFiConnect(const char * ssid, const char * password) { ChipLogProgress(DeviceLayer, "Connecting to AP : [%s]", (char *) ssid); int32_t error = matter_wifi_connect((char *) ssid, RTW_SECURITY_WPA_WPA2_MIXED, (char *) password, strlen(ssid), - strlen(password), 0, nullptr); + strlen(password), 0, nullptr); CHIP_ERROR err = MapError(error, AmebaErrorType::kWiFiError); return err; } diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index bfa06b176949ee..9d2fcfc4845a03 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -24,8 +24,8 @@ /* this file behaves like a config.h, comes first */ #include +#include #include -#include #include #include diff --git a/src/platform/Infineon/PSOC6/P6Utils.cpp b/src/platform/Infineon/PSOC6/P6Utils.cpp index 7f750c4af50612..62cdb83f96f711 100644 --- a/src/platform/Infineon/PSOC6/P6Utils.cpp +++ b/src/platform/Infineon/PSOC6/P6Utils.cpp @@ -26,8 +26,8 @@ #include #include +#include #include -#include #include #include @@ -437,7 +437,7 @@ CHIP_ERROR P6Utils::p6_wifi_connect(void) return err; } -#define INITIALISER_IPV4_ADDRESS1(addr_var, addr_val) addr_var = { CY_WCM_IP_VER_V4, { .v4 = (uint32_t)(addr_val) } } +#define INITIALISER_IPV4_ADDRESS1(addr_var, addr_val) addr_var = { CY_WCM_IP_VER_V4, { .v4 = (uint32_t) (addr_val) } } #define MAKE_IPV4_ADDRESS1(a, b, c, d) ((((uint32_t) d) << 24) | (((uint32_t) c) << 16) | (((uint32_t) b) << 8) | ((uint32_t) a)) static const cy_wcm_ip_setting_t ap_mode_ip_settings2 = { INITIALISER_IPV4_ADDRESS1(.ip_address, MAKE_IPV4_ADDRESS1(192, 168, 0, 2)), @@ -861,7 +861,7 @@ uint32_t get_heap_total() uint8_t * heap_base = (uint8_t *) &__HeapBase; uint8_t * heap_limit = (uint8_t *) &__HeapLimit; - return (uint32_t)(heap_limit - heap_base); + return (uint32_t) (heap_limit - heap_base); } /* Populate Heap info based on heap total size and Current Heap usage */ diff --git a/src/platform/OpenThread/OpenThreadUtils.cpp b/src/platform/OpenThread/OpenThreadUtils.cpp index 6f89d1a4a28052..ef97c7a4e35947 100644 --- a/src/platform/OpenThread/OpenThreadUtils.cpp +++ b/src/platform/OpenThread/OpenThreadUtils.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 102b7604e0a2a0..6483920d410ac9 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -50,9 +50,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp index 48658321a6dc0e..d6501cbde80e38 100644 --- a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp @@ -20,8 +20,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/src/pybindings/pycontroller/ControllerBindings/PyChip_ErrorStr.cpp b/src/pybindings/pycontroller/ControllerBindings/PyChip_ErrorStr.cpp index 9dfa362cc4b42b..b59424d10d087d 100644 --- a/src/pybindings/pycontroller/ControllerBindings/PyChip_ErrorStr.cpp +++ b/src/pybindings/pycontroller/ControllerBindings/PyChip_ErrorStr.cpp @@ -15,8 +15,8 @@ * limitations under the License. */ #include +#include #include -#include #include #include diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 2eae6348e0b12d..8882854b675f42 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -233,6 +233,7 @@ static_library("system") { cflags = [ "-Wconversion" ] public_deps = [ + "${chip_root}/src/lib/core:error", "${chip_root}/src/lib/support", "${chip_root}/src/platform:platform_buildconfig", "${nlassert_root}:nlassert", diff --git a/src/system/SystemError.cpp b/src/system/SystemError.cpp index 2a5680168a3194..531aea929c9aae 100644 --- a/src/system/SystemError.cpp +++ b/src/system/SystemError.cpp @@ -27,8 +27,8 @@ // Include module header #include +#include #include -#include #include diff --git a/src/system/tests/TestSystemClock.cpp b/src/system/tests/TestSystemClock.cpp index d0bd76e08ec010..b2b9826d395979 100644 --- a/src/system/tests/TestSystemClock.cpp +++ b/src/system/tests/TestSystemClock.cpp @@ -21,8 +21,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/system/tests/TestSystemErrorStr.cpp b/src/system/tests/TestSystemErrorStr.cpp index 437d5fc1a69ca8..166c140fdde616 100644 --- a/src/system/tests/TestSystemErrorStr.cpp +++ b/src/system/tests/TestSystemErrorStr.cpp @@ -37,8 +37,8 @@ #include #include +#include #include -#include #include #include diff --git a/src/system/tests/TestSystemScheduleLambda.cpp b/src/system/tests/TestSystemScheduleLambda.cpp index 1826bec5e0619c..f43fadd94ab2eb 100644 --- a/src/system/tests/TestSystemScheduleLambda.cpp +++ b/src/system/tests/TestSystemScheduleLambda.cpp @@ -16,8 +16,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/system/tests/TestSystemScheduleWork.cpp b/src/system/tests/TestSystemScheduleWork.cpp index 05b047997f9311..29c4a6eda75efd 100644 --- a/src/system/tests/TestSystemScheduleWork.cpp +++ b/src/system/tests/TestSystemScheduleWork.cpp @@ -16,8 +16,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/system/tests/TestSystemTimer.cpp b/src/system/tests/TestSystemTimer.cpp index 1648c700f46e37..cbfd22ac87476e 100644 --- a/src/system/tests/TestSystemTimer.cpp +++ b/src/system/tests/TestSystemTimer.cpp @@ -29,8 +29,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/system/tests/TestSystemWakeEvent.cpp b/src/system/tests/TestSystemWakeEvent.cpp index e311f75f642ce3..20bd65821aa4ae 100644 --- a/src/system/tests/TestSystemWakeEvent.cpp +++ b/src/system/tests/TestSystemWakeEvent.cpp @@ -27,8 +27,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/system/tests/TestTimeSource.cpp b/src/system/tests/TestTimeSource.cpp index 59a15e57d5d345..0e5930c22000c4 100644 --- a/src/system/tests/TestTimeSource.cpp +++ b/src/system/tests/TestTimeSource.cpp @@ -27,8 +27,8 @@ #include +#include #include -#include #include #include #include diff --git a/src/test_driver/esp32/main/main_app.cpp b/src/test_driver/esp32/main/main_app.cpp index 0ff3ce4690d6b8..6045a4f6f63800 100644 --- a/src/test_driver/esp32/main/main_app.cpp +++ b/src/test_driver/esp32/main/main_app.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/src/tools/chip-cert/chip-cert.h b/src/tools/chip-cert/chip-cert.h index 884e648a87b0d1..81f5ab733133bb 100644 --- a/src/tools/chip-cert/chip-cert.h +++ b/src/tools/chip-cert/chip-cert.h @@ -57,11 +57,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/src/tracing/json/json_tracing.cpp b/src/tracing/json/json_tracing.cpp index 204ca8fa742aa6..b85bb4545eb549 100644 --- a/src/tracing/json/json_tracing.cpp +++ b/src/tracing/json/json_tracing.cpp @@ -19,8 +19,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/src/tracing/perfetto/perfetto_tracing.cpp b/src/tracing/perfetto/perfetto_tracing.cpp index 18bfbdfac48b52..6d89dbbccc9723 100644 --- a/src/tracing/perfetto/perfetto_tracing.cpp +++ b/src/tracing/perfetto/perfetto_tracing.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include diff --git a/src/transport/raw/tests/NetworkTestHelpers.cpp b/src/transport/raw/tests/NetworkTestHelpers.cpp index 51da02367aeb80..5d967ebed3d2fc 100644 --- a/src/transport/raw/tests/NetworkTestHelpers.cpp +++ b/src/transport/raw/tests/NetworkTestHelpers.cpp @@ -19,9 +19,9 @@ #include +#include #include #include -#include #include namespace chip { diff --git a/src/transport/raw/tests/TestMessageHeader.cpp b/src/transport/raw/tests/TestMessageHeader.cpp index 41b1b527adfbca..93b1ef65ad6389 100644 --- a/src/transport/raw/tests/TestMessageHeader.cpp +++ b/src/transport/raw/tests/TestMessageHeader.cpp @@ -23,9 +23,9 @@ * */ +#include #include #include -#include #include #include #include @@ -432,7 +432,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN, .msgLength = HDR_LEN + PRO_LEN + APP_LEN, .msg = "\x00\x00\x00\x00\xCC\xCC\xCC\xCC" - "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", + "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", }, // ================== Test MX ================== { @@ -441,7 +441,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN, .msgLength = HDR_LEN + MX_LEN + PRO_LEN + APP_LEN, .msg = "\x00\x00\x00\x20\xCC\xCC\xCC\xCC\x04\x00\xE4\xE3\xE2\xE1" - "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", + "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", }, { // SRC=1, DST=none, MX=1, SX=0 @@ -449,7 +449,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN, .msgLength = HDR_LEN + MX_LEN + SRC_LEN + PRO_LEN + APP_LEN, .msg = "\x04\x00\x00\x20\xCC\xCC\xCC\xCC\x11\x11\x11\x11\x11\x11\x11\x11\x04\x00\xE4\xE3\xE2\xE1" - "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", + "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", }, { // SRC=none, DST=1, MX=1, SX=0 @@ -457,7 +457,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN, .msgLength = HDR_LEN + MX_LEN + DST_LEN + PRO_LEN + APP_LEN, .msg = "\x01\x00\x00\x20\xCC\xCC\xCC\xCC\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\x04\x00\xE4\xE3\xE2\xE1" - "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", + "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", }, { // SRC=1, DST=1, MX=1, SX=0 @@ -474,7 +474,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN, .msgLength = HDR_LEN + MX_LEN + GID_LEN + PRO_LEN + APP_LEN, .msg = "\x02\x00\x00\x21\xCC\xCC\xCC\xCC\xDD\xDD\x04\x00\xE4\xE3\xE2\xE1" - "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", + "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", }, { // SRC=1, DST=group, MX=1, SX=0 @@ -482,7 +482,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN, .msgLength = HDR_LEN + MX_LEN + SRC_LEN + GID_LEN + PRO_LEN + APP_LEN, .msg = "\x06\x00\x00\x21\xCC\xCC\xCC\xCC\x11\x11\x11\x11\x11\x11\x11\x11\xDD\xDD\x04\x00\xE4\xE3\xE2\xE1" - "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", + "\x01\xCC\xEE\xEE\x66\x66\xBB\xBB", }, // ================== Test SX ================== { @@ -491,7 +491,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN + SX_LEN, .msgLength = HDR_LEN + PRO_LEN + SX_LEN + APP_LEN, .msg = "\x00\x00\x00\x00\xCC\xCC\xCC\xCC" - "\x08\xCC\xEE\xEE\x66\x66\x04\x00\xE4\xE3\xE2\xE1\xBB\xBB", + "\x08\xCC\xEE\xEE\x66\x66\x04\x00\xE4\xE3\xE2\xE1\xBB\xBB", }, { // SRC=none, DST=none, MX=1, SX=1 @@ -499,7 +499,7 @@ struct TestVectorMsgExtensions theTestVectorMsgExtensions[] = { .appPayloadOffset = PRO_LEN + SX_LEN, .msgLength = HDR_LEN + MX_LEN + PRO_LEN + SX_LEN + APP_LEN, .msg = "\x00\x00\x00\x20\xCC\xCC\xCC\xCC\x04\x00\xE4\xE3\xE2\xE1" - "\x08\xCC\xEE\xEE\x66\x66\x04\x00\xE4\xE3\xE2\xE1\xBB\xBB", + "\x08\xCC\xEE\xEE\x66\x66\x04\x00\xE4\xE3\xE2\xE1\xBB\xBB", }, { // SRC=1, DST=1, MX=1, SX=1 diff --git a/src/transport/tests/TestPeerConnections.cpp b/src/transport/tests/TestPeerConnections.cpp index b7de7c546e6965..f4ea8c40244919 100644 --- a/src/transport/tests/TestPeerConnections.cpp +++ b/src/transport/tests/TestPeerConnections.cpp @@ -22,8 +22,8 @@ * the SecureSessionTable class within the transport layer * */ +#include #include -#include #include #include @@ -102,7 +102,7 @@ void TestBasicFunctionality(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, sessions[i].HasValue()); } - //#endif + // #endif System::Clock::Internal::SetSystemClockForTesting(realClock); }