diff --git a/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp b/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp index 0a5d9dd2617ce1..42551f7cb40579 100644 --- a/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp @@ -43,7 +43,7 @@ #include #endif -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp index b31d2629af14aa..338a469bb32947 100644 --- a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp @@ -45,7 +45,7 @@ #include "Globals.h" #include "LEDWidget.h" -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/all-clusters-app/esp32/main/AppTask.cpp b/examples/all-clusters-app/esp32/main/AppTask.cpp index 33b000f6a1baf1..2b7e7d89b921fc 100644 --- a/examples/all-clusters-app/esp32/main/AppTask.cpp +++ b/examples/all-clusters-app/esp32/main/AppTask.cpp @@ -42,7 +42,7 @@ #define APP_EVENT_QUEUE_SIZE 10 #define APP_TASK_STACK_SIZE (3072) -static const char * TAG = "app-task"; +static const char TAG[] = "app-task"; namespace { TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer diff --git a/examples/all-clusters-app/esp32/main/BluetoothWidget.cpp b/examples/all-clusters-app/esp32/main/BluetoothWidget.cpp index 452fb4ff85bb6f..523bb95585a8c5 100644 --- a/examples/all-clusters-app/esp32/main/BluetoothWidget.cpp +++ b/examples/all-clusters-app/esp32/main/BluetoothWidget.cpp @@ -31,7 +31,7 @@ #include "ScreenManager.h" #endif -extern const char * TAG; +extern const char TAG[]; void BluetoothWidget::Init() { diff --git a/examples/all-clusters-app/esp32/main/Button.cpp b/examples/all-clusters-app/esp32/main/Button.cpp index a1930290f6ebad..baa0b47a215aa3 100644 --- a/examples/all-clusters-app/esp32/main/Button.cpp +++ b/examples/all-clusters-app/esp32/main/Button.cpp @@ -35,7 +35,7 @@ #include #include -static const char * TAG = "Button.cpp"; +static const char TAG[] = "Button.cpp"; extern Button gButtons[BUTTON_NUMBER]; diff --git a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp index 271dc3711e3c15..056ce09eb5fffc 100644 --- a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp @@ -41,7 +41,7 @@ #include #endif -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index c0caa12cc2eebe..621ee8f6d2ce0a 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -28,7 +28,7 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; -static const char * TAG = "DeviceWithDisplay"; +static const char TAG[] = "DeviceWithDisplay"; #if CONFIG_DEVICE_TYPE_M5STACK diff --git a/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp b/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp index 2130da0107f31d..578f44003f435e 100644 --- a/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp +++ b/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp @@ -43,7 +43,7 @@ #include // TODO need sensible library tag when put in library -extern const char * TAG; +extern const char TAG[]; namespace { diff --git a/examples/all-clusters-app/esp32/main/WiFiWidget.cpp b/examples/all-clusters-app/esp32/main/WiFiWidget.cpp index 06a47a6f8532c7..b644662ae33dbd 100644 --- a/examples/all-clusters-app/esp32/main/WiFiWidget.cpp +++ b/examples/all-clusters-app/esp32/main/WiFiWidget.cpp @@ -31,7 +31,7 @@ #include "ScreenManager.h" #endif -extern const char * TAG; +extern const char TAG[]; void WiFiWidget::Init() { diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index a90ff6327628fb..9972f95b95f546 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -72,7 +72,7 @@ using namespace ::chip::Credentials; // Used to indicate that an IP address has been added to the QRCode #define EXAMPLE_VENDOR_TAG_IP 1 -const char * TAG = "all-clusters-app"; +extern const char TAG[] = "all-clusters-app"; static AppDeviceCallbacks EchoCallbacks; static AppDeviceCallbacksDelegate sAppDeviceCallbacksDelegate; diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp index 5e29a11cc9b290..e103359f593400 100644 --- a/examples/all-clusters-app/nxp/mw320/main.cpp +++ b/examples/all-clusters-app/nxp/mw320/main.cpp @@ -111,7 +111,7 @@ enum }; static int Matter_Selection = MAX_SELECTION; #define RUN_RST_LT_DELAY 10 -static const char * TAG = "mw320"; +static const char TAG[] = "mw320"; /******************************************************************************* * Variables diff --git a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp index 93092cf59a7a54..67b13d9abb9506 100644 --- a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp @@ -40,7 +40,7 @@ #include "Globals.h" #include "LEDWidget.h" -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/all-clusters-minimal-app/esp32/main/AppTask.cpp b/examples/all-clusters-minimal-app/esp32/main/AppTask.cpp index 27c77c94ff90a4..89394e65c2560b 100644 --- a/examples/all-clusters-minimal-app/esp32/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/AppTask.cpp @@ -41,7 +41,7 @@ #define APP_EVENT_QUEUE_SIZE 10 #define APP_TASK_STACK_SIZE (3072) -static const char * TAG = "app-task"; +static const char TAG[] = "app-task"; namespace { diff --git a/examples/all-clusters-minimal-app/esp32/main/BluetoothWidget.cpp b/examples/all-clusters-minimal-app/esp32/main/BluetoothWidget.cpp index 452fb4ff85bb6f..523bb95585a8c5 100644 --- a/examples/all-clusters-minimal-app/esp32/main/BluetoothWidget.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/BluetoothWidget.cpp @@ -31,7 +31,7 @@ #include "ScreenManager.h" #endif -extern const char * TAG; +extern const char TAG[]; void BluetoothWidget::Init() { diff --git a/examples/all-clusters-minimal-app/esp32/main/Button.cpp b/examples/all-clusters-minimal-app/esp32/main/Button.cpp index dd25966503ba80..fc168aeb5596f4 100644 --- a/examples/all-clusters-minimal-app/esp32/main/Button.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/Button.cpp @@ -38,7 +38,7 @@ #include #include -static const char * TAG = "Button.cpp"; +static const char TAG[] = "Button.cpp"; extern Button gButtons[BUTTON_NUMBER]; diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp index cff72337968ef4..6748c79a920c85 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp @@ -40,7 +40,7 @@ #include #endif -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index dd85fcda16a152..9ed8fc733deca2 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp @@ -27,7 +27,7 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; -static const char * TAG = "DeviceWithDisplay"; +static const char TAG[] = "DeviceWithDisplay"; #if CONFIG_DEVICE_TYPE_M5STACK diff --git a/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp b/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp index 2130da0107f31d..578f44003f435e 100644 --- a/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp @@ -43,7 +43,7 @@ #include // TODO need sensible library tag when put in library -extern const char * TAG; +extern const char TAG[]; namespace { diff --git a/examples/all-clusters-minimal-app/esp32/main/WiFiWidget.cpp b/examples/all-clusters-minimal-app/esp32/main/WiFiWidget.cpp index cafc40cbfabf19..13ab2f4866625c 100644 --- a/examples/all-clusters-minimal-app/esp32/main/WiFiWidget.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/WiFiWidget.cpp @@ -30,7 +30,7 @@ #if CONFIG_HAVE_DISPLAY #include "ScreenManager.h" #endif -extern const char * TAG; +extern const char TAG[]; void WiFiWidget::Init() { diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index 5b2af4cc4b2232..0ac538607efd89 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -70,7 +70,7 @@ using namespace ::chip::DeviceManager; // Used to indicate that an IP address has been added to the QRCode #define EXAMPLE_VENDOR_TAG_IP 1 -const char * TAG = "all-clusters-minimal-app"; +extern const char TAG[] = "all-clusters-minimal-app"; static AppDeviceCallbacks EchoCallbacks; static AppDeviceCallbacksDelegate sAppDeviceCallbacksDelegate; diff --git a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp index 6897d116cac806..b54c8b4ebb3934 100644 --- a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "DeviceCallbacks.h" -static const char * TAG = "bridge-devicecallbacks"; +static const char TAG[] = "bridge-devicecallbacks"; using namespace ::chip; using namespace ::chip::app; diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 55b36e1e6835e7..62996518310533 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -60,7 +60,7 @@ chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; #endif // CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER } // namespace -const char * TAG = "bridge-app"; +extern const char TAG[] = "bridge-app"; using namespace ::chip; using namespace ::chip::DeviceManager; diff --git a/examples/chef/ameba/main/DeviceCallbacks.cpp b/examples/chef/ameba/main/DeviceCallbacks.cpp index d32135cb48765c..fd8a63e5a846c4 100644 --- a/examples/chef/ameba/main/DeviceCallbacks.cpp +++ b/examples/chef/ameba/main/DeviceCallbacks.cpp @@ -43,7 +43,7 @@ #include "Globals.h" #include "LEDWidget.h" -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/chef/esp32/main/QRCodeScreen.cpp b/examples/chef/esp32/main/QRCodeScreen.cpp index 2130da0107f31d..578f44003f435e 100644 --- a/examples/chef/esp32/main/QRCodeScreen.cpp +++ b/examples/chef/esp32/main/QRCodeScreen.cpp @@ -43,7 +43,7 @@ #include // TODO need sensible library tag when put in library -extern const char * TAG; +extern const char TAG[]; namespace { diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp index 49e817dfe5db9f..9a4ade78771102 100644 --- a/examples/chef/esp32/main/main.cpp +++ b/examples/chef/esp32/main/main.cpp @@ -122,7 +122,7 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) ChipLogProgress(Shell, "Current free heap: %u\n", static_cast(heap_caps_get_free_size(MALLOC_CAP_8BIT))); } -const char * TAG = "chef-app"; +extern const char TAG[] = "chef-app"; #if CONFIG_HAVE_DISPLAY void printQRCode() diff --git a/examples/common/screen-framework/Display.cpp b/examples/common/screen-framework/Display.cpp index e122c4c9cbead1..a44cd8c884ea56 100644 --- a/examples/common/screen-framework/Display.cpp +++ b/examples/common/screen-framework/Display.cpp @@ -46,7 +46,7 @@ // The M5Stack's backlight is on Channel 7 #define BACKLIGHT_CHANNEL LEDC_CHANNEL_7 -static const char * TAG = "Display"; +static const char TAG[] = "Display"; uint16_t DisplayHeight = 0; uint16_t DisplayWidth = 0; diff --git a/examples/common/tracing/TraceDecoder.cpp b/examples/common/tracing/TraceDecoder.cpp index dec46706af16fe..1d6828b1dfe9b2 100644 --- a/examples/common/tracing/TraceDecoder.cpp +++ b/examples/common/tracing/TraceDecoder.cpp @@ -28,7 +28,7 @@ #include constexpr uint16_t kMaxLineLen = 4096; -constexpr const char * jsonPrefix = " json\t"; +constexpr const char jsonPrefix[] = " json\t"; namespace chip { namespace trace { diff --git a/examples/common/tracing/TraceDecoderArgumentParser.cpp b/examples/common/tracing/TraceDecoderArgumentParser.cpp index 530cbe62c070a1..5a678b9c7bbcdb 100644 --- a/examples/common/tracing/TraceDecoderArgumentParser.cpp +++ b/examples/common/tracing/TraceDecoderArgumentParser.cpp @@ -56,7 +56,7 @@ OptionDef sProgramOptionDefs[] = { {} }; -const char * sProgramOptionHelp = " --source \n" +const char sProgramOptionHelp[] = " --source \n" " The log file to decode.\n" // Protocol " --disable-protocol-secure-channel\n" diff --git a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp index b5fbaf1ece36c4..8463ccce3ada74 100644 --- a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp @@ -44,7 +44,7 @@ #include "Globals.h" #include "LEDWidget.h" -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/light-switch-app/esp32/main/AppTask.cpp b/examples/light-switch-app/esp32/main/AppTask.cpp index c6fd44d6b38518..caa742d19c9e7f 100644 --- a/examples/light-switch-app/esp32/main/AppTask.cpp +++ b/examples/light-switch-app/esp32/main/AppTask.cpp @@ -29,7 +29,7 @@ using namespace chip; -static const char * TAG = "app-task"; +static const char TAG[] = "app-task"; Button AppButton; diff --git a/examples/light-switch-app/esp32/main/Button.cpp b/examples/light-switch-app/esp32/main/Button.cpp index 0f14b694c39093..a97e8d50c87ba5 100644 --- a/examples/light-switch-app/esp32/main/Button.cpp +++ b/examples/light-switch-app/esp32/main/Button.cpp @@ -22,7 +22,7 @@ #define GPIO_INPUT_PIN_SEL (1ULL << GPIO_INPUT_IO_0) #define ESP_INTR_FLAG_DEFAULT 0 -static const char * TAG = "Button"; +static const char TAG[] = "Button"; static Button::ButtonPressCallback button_press_handler = nullptr; diff --git a/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp b/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp index b4f73ec65fdf6a..dd82cac0f6dbf4 100644 --- a/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "DeviceCallbacks.h" #include -static const char * TAG = "light-switch-app-callbacks"; +static const char TAG[] = "light-switch-app-callbacks"; using namespace chip; using namespace chip::Inet; diff --git a/examples/light-switch-app/esp32/main/main.cpp b/examples/light-switch-app/esp32/main/main.cpp index 43c98425fe565c..f8127433f14f60 100644 --- a/examples/light-switch-app/esp32/main/main.cpp +++ b/examples/light-switch-app/esp32/main/main.cpp @@ -69,7 +69,7 @@ DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; #endif // CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER } // namespace -static const char * TAG = "light-switch-app"; +static const char TAG[] = "light-switch-app"; static AppDeviceCallbacks EchoCallbacks; static AppDeviceCallbacksDelegate sAppDeviceCallbacksDelegate; diff --git a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp index abc6472d2c72b9..0ba785b9b9233e 100644 --- a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp @@ -43,7 +43,7 @@ #include #endif -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/lighting-app/beken/main/DeviceCallbacks.cpp b/examples/lighting-app/beken/main/DeviceCallbacks.cpp index e2dc0d4e0e32ad..f2e5b099700d91 100644 --- a/examples/lighting-app/beken/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/beken/main/DeviceCallbacks.cpp @@ -38,7 +38,7 @@ #include #include -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index 6369cf91089670..33b1505aafc581 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -35,7 +35,7 @@ using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; -static const char * TAG = "app-task"; +static const char TAG[] = "app-task"; LEDWidget AppLED; diff --git a/examples/lighting-app/esp32/main/Button.cpp b/examples/lighting-app/esp32/main/Button.cpp index 639b90befa8055..24fc94eea709ac 100644 --- a/examples/lighting-app/esp32/main/Button.cpp +++ b/examples/lighting-app/esp32/main/Button.cpp @@ -30,7 +30,7 @@ #include #include -static const char * TAG = "Button.cpp"; +static const char TAG[] = "Button.cpp"; extern Button gButtons[BUTTON_NUMBER]; diff --git a/examples/lighting-app/esp32/main/DeviceCallbacks.cpp b/examples/lighting-app/esp32/main/DeviceCallbacks.cpp index dcaaa187186b9e..00d6769e684257 100644 --- a/examples/lighting-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/esp32/main/DeviceCallbacks.cpp @@ -29,7 +29,7 @@ #include #include -static const char * TAG = "light-app-callbacks"; +static const char TAG[] = "light-app-callbacks"; extern LEDWidget AppLED; diff --git a/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp b/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp index bbca9845d0662d..b869ba5ae61fbb 100644 --- a/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp @@ -30,7 +30,7 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; -static const char * TAG = "DeviceWithDisplay"; +static const char TAG[] = "DeviceWithDisplay"; #if CONFIG_DEVICE_TYPE_M5STACK diff --git a/examples/lighting-app/esp32/main/LEDWidget.cpp b/examples/lighting-app/esp32/main/LEDWidget.cpp index ffac77546d069f..621113547a962b 100644 --- a/examples/lighting-app/esp32/main/LEDWidget.cpp +++ b/examples/lighting-app/esp32/main/LEDWidget.cpp @@ -22,7 +22,7 @@ #endif #include "led_strip.h" -static const char * TAG = "LEDWidget"; +static const char TAG[] = "LEDWidget"; void LEDWidget::Init(void) { diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index 790bd9b7867dff..5b79e3d7083e14 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -75,7 +75,7 @@ extern const char insights_auth_key_start[] asm("_binary_insights_auth_key_txt_s extern const char insights_auth_key_end[] asm("_binary_insights_auth_key_txt_end"); #endif -static const char * TAG = "light-app"; +static const char TAG[] = "light-app"; static AppDeviceCallbacks EchoCallbacks; static AppDeviceCallbacksDelegate sAppDeviceCallbacksDelegate; diff --git a/examples/lock-app/esp32/main/DeviceCallbacks.cpp b/examples/lock-app/esp32/main/DeviceCallbacks.cpp index 1b28605f4c2701..f82011dc2a163a 100644 --- a/examples/lock-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/lock-app/esp32/main/DeviceCallbacks.cpp @@ -29,7 +29,7 @@ #include -static const char * TAG = "lock-devicecallbacks"; +static const char TAG[] = "lock-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/lock-app/esp32/main/main.cpp b/examples/lock-app/esp32/main/main.cpp index 3549b83cad9c77..85ab39cb3af8d6 100644 --- a/examples/lock-app/esp32/main/main.cpp +++ b/examples/lock-app/esp32/main/main.cpp @@ -68,7 +68,7 @@ DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; #endif // CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER } // namespace -static const char * TAG = "lock-app"; +static const char TAG[] = "lock-app"; static AppDeviceCallbacks EchoCallbacks; diff --git a/examples/ota-provider-app/esp32/main/DeviceCallbacks.cpp b/examples/ota-provider-app/esp32/main/DeviceCallbacks.cpp index c4f5e81ec09da2..6cebe4fcce71ac 100644 --- a/examples/ota-provider-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/ota-provider-app/esp32/main/DeviceCallbacks.cpp @@ -24,7 +24,7 @@ **/ #include "DeviceCallbacks.h" -static const char * TAG = "echo-devicecallbacks"; +static const char TAG[] = "echo-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/ota-provider-app/esp32/main/main.cpp b/examples/ota-provider-app/esp32/main/main.cpp index 82f8d52914bd17..ae1a9906f28014 100644 --- a/examples/ota-provider-app/esp32/main/main.cpp +++ b/examples/ota-provider-app/esp32/main/main.cpp @@ -58,7 +58,7 @@ void OnTransferComplete(void * context); void OnTransferFailed(void * context, BdxSenderErrorTypes status); namespace { -const char * TAG = "ota-provider-app"; +extern const char TAG[] = "ota-provider-app"; const uint8_t kMaxImagePathlen = 35; static AppDeviceCallbacks EchoCallbacks; diff --git a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp index 67cb1ac8b9d747..bd53af45ed4f61 100644 --- a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp @@ -45,7 +45,7 @@ #include "Globals.h" #include "LEDWidget.h" -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/ota-requestor-app/esp32/main/DeviceCallbacks.cpp b/examples/ota-requestor-app/esp32/main/DeviceCallbacks.cpp index c4f5e81ec09da2..6cebe4fcce71ac 100644 --- a/examples/ota-requestor-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/ota-requestor-app/esp32/main/DeviceCallbacks.cpp @@ -24,7 +24,7 @@ **/ #include "DeviceCallbacks.h" -static const char * TAG = "echo-devicecallbacks"; +static const char TAG[] = "echo-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index a962d7c236a51e..f8282ccdf22e30 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -58,7 +58,7 @@ using namespace chip::Shell; using namespace ::chip::Credentials; namespace { -const char * TAG = "ota-requester-app"; +extern const char TAG[] = "ota-requester-app"; static AppDeviceCallbacks EchoCallbacks; constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; diff --git a/examples/persistent-storage/esp32/main/main.cpp b/examples/persistent-storage/esp32/main/main.cpp index 64053a79e31887..b319be52c952cd 100644 --- a/examples/persistent-storage/esp32/main/main.cpp +++ b/examples/persistent-storage/esp32/main/main.cpp @@ -23,7 +23,7 @@ #include #include -const char * TAG = "persistent-storage"; +extern const char TAG[] = "persistent-storage"; extern "C" void app_main() { diff --git a/examples/pigweed-app/esp32/main/main.cpp b/examples/pigweed-app/esp32/main/main.cpp index e99502afdb894c..c22175ff7d8da3 100644 --- a/examples/pigweed-app/esp32/main/main.cpp +++ b/examples/pigweed-app/esp32/main/main.cpp @@ -33,7 +33,7 @@ #include "lwip/sockets.h" #include "lwip/sys.h" -const char * TAG = "chip-pigweed-app"; +extern const char TAG[] = "chip-pigweed-app"; namespace { using std::byte; diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp index 0830c49a478cc3..ede4e154483154 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp @@ -29,7 +29,7 @@ #include #endif -static const char * TAG = "app-devicecallbacks"; +static const char TAG[] = "app-devicecallbacks"; using namespace chip; using namespace chip::DeviceLayer; diff --git a/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp b/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp index 9f0472d6fb7532..e0d7decc849616 100644 --- a/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp @@ -24,7 +24,7 @@ **/ #include "DeviceCallbacks.h" -static const char * TAG = "echo-devicecallbacks"; +static const char TAG[] = "echo-devicecallbacks"; using namespace ::chip; using namespace ::chip::Inet; diff --git a/examples/temperature-measurement-app/esp32/main/main.cpp b/examples/temperature-measurement-app/esp32/main/main.cpp index e1102f80b4e8f8..cb9ba768412772 100644 --- a/examples/temperature-measurement-app/esp32/main/main.cpp +++ b/examples/temperature-measurement-app/esp32/main/main.cpp @@ -66,7 +66,7 @@ using namespace ::chip; using namespace ::chip::DeviceManager; using namespace ::chip::Credentials; -const char * TAG = "temperature-measurement-app"; +extern const char TAG[] = "temperature-measurement-app"; static AppDeviceCallbacks EchoCallbacks; diff --git a/src/controller/python/chip/server/Options.cpp b/src/controller/python/chip/server/Options.cpp index 05efe2e49b14f0..b53bd96ab15cdf 100644 --- a/src/controller/python/chip/server/Options.cpp +++ b/src/controller/python/chip/server/Options.cpp @@ -46,7 +46,7 @@ OptionDef sDeviceOptionDefs[] = { { "ble-device", kArgumentRequired, kDeviceOpti #endif // CHIP_ENABLE_OPENTHREAD {} }; -const char * sDeviceOptionHelp = " --ble-device \n" +const char sDeviceOptionHelp[] = " --ble-device \n" " The device number for CHIPoBLE, without 'hci' prefix, can be found by hciconfig.\n" #if CHIP_DEVICE_CONFIG_ENABLE_WPA "\n" diff --git a/src/include/platform/internal/CHIPDeviceLayerInternal.h b/src/include/platform/internal/CHIPDeviceLayerInternal.h index 0e31d7466305a1..4c4d9bb7c967d1 100644 --- a/src/include/platform/internal/CHIPDeviceLayerInternal.h +++ b/src/include/platform/internal/CHIPDeviceLayerInternal.h @@ -25,7 +25,7 @@ namespace chip { namespace DeviceLayer { namespace Internal { -extern const char * const TAG; +extern const char TAG[]; } // namespace Internal } // namespace DeviceLayer diff --git a/src/lib/support/tests/TestErrorStr.cpp b/src/lib/support/tests/TestErrorStr.cpp index 78d5c63dc1f170..5678463d258197 100644 --- a/src/lib/support/tests/TestErrorStr.cpp +++ b/src/lib/support/tests/TestErrorStr.cpp @@ -131,8 +131,8 @@ static void CheckFormatErr(nlTestSuite * inSuite, void * inContext) #else // CHIP_CONFIG_SHORT_ERROR_STR static const size_t kBufSize = 1024; static char buf[kBufSize]; - static const char * subsys = "subsys"; - static const char * desc = "desc"; + static const char subsys[] = "subsys"; + static const char desc[] = "desc"; strcpy(buf, "hi"); // shouldn't touch the buffer diff --git a/src/platform/Globals.cpp b/src/platform/Globals.cpp index 04bd9ce3fe273b..6dd9a9259b8333 100644 --- a/src/platform/Globals.cpp +++ b/src/platform/Globals.cpp @@ -53,7 +53,7 @@ chip::System::LayerSockets & SystemLayerSockets() #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS namespace Internal { -const char * const TAG = "CHIP[DL]"; +extern const char TAG[] = "CHIP[DL]"; } // namespace Internal } // namespace DeviceLayer diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index f4426cde2119de..3718028f869c0b 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -85,13 +85,13 @@ struct BLEConnection }; /* CHIPoBLE UUID strings */ -const char * chip_ble_service_uuid = "0000FFF6-0000-1000-8000-00805F9B34FB"; -const char * chip_ble_char_c1_tx_uuid = "18EE2EF5-263D-4559-959F-4F9C429F9D11"; -const char * chip_ble_char_c2_rx_uuid = "18EE2EF5-263D-4559-959F-4F9C429F9D12"; +const char chip_ble_service_uuid[] = "0000FFF6-0000-1000-8000-00805F9B34FB"; +const char chip_ble_char_c1_tx_uuid[] = "18EE2EF5-263D-4559-959F-4F9C429F9D11"; +const char chip_ble_char_c2_rx_uuid[] = "18EE2EF5-263D-4559-959F-4F9C429F9D12"; /* CCCD */ -const char * desc_uuid_short = "2902"; +const char desc_uuid_short[] = "2902"; -const char * chip_ble_service_uuid_short = "FFF6"; +const char chip_ble_service_uuid_short[] = "FFF6"; /* Tizen Default Scan Timeout */ static constexpr System::Clock::Timeout kNewConnectionScanTimeout = System::Clock::Seconds16(10); diff --git a/src/platform/Tizen/ChipDeviceScanner.cpp b/src/platform/Tizen/ChipDeviceScanner.cpp index d69db7bf24263a..6bf80c63c48006 100644 --- a/src/platform/Tizen/ChipDeviceScanner.cpp +++ b/src/platform/Tizen/ChipDeviceScanner.cpp @@ -41,8 +41,8 @@ namespace DeviceLayer { namespace Internal { // CHIPoBLE UUID strings -const char * chip_service_uuid = "0000FFF6-0000-1000-8000-00805F9B34FB"; -const char * chip_service_uuid_short = "FFF6"; +const char chip_service_uuid[] = "0000FFF6-0000-1000-8000-00805F9B34FB"; +const char chip_service_uuid_short[] = "FFF6"; ChipDeviceScanner::ChipDeviceScanner(ChipDeviceScannerDelegate * delegate) : mDelegate(delegate) {} diff --git a/src/platform/mbed/Logging.cpp b/src/platform/mbed/Logging.cpp index 30615852363f16..1b85d2c0ec8d7b 100644 --- a/src/platform/mbed/Logging.cpp +++ b/src/platform/mbed/Logging.cpp @@ -38,7 +38,7 @@ #define DEFAULT_TRACE_FILTER_LENGTH 24 #endif -static const char * TRACE_GROUP = "CHIP"; +static const char TRACE_GROUP[] = "CHIP"; namespace chip { namespace DeviceLayer { diff --git a/src/platform/nxp/common/NXPConfig.cpp b/src/platform/nxp/common/NXPConfig.cpp index a90a3e44d05aa7..fef73e8a31a34e 100644 --- a/src/platform/nxp/common/NXPConfig.cpp +++ b/src/platform/nxp/common/NXPConfig.cpp @@ -109,8 +109,8 @@ NVM_RegisterDataSet((void *) &chipConfigRamStructKeyString, 1, sizeof(chipConfig NVM_ID_CHIP_CONFIG_DATA_KEY_STRING, gNVM_MirroredInRam_c); #elif (CHIP_PLAT_NVM_SUPPORT == CHIP_PLAT_LITTLEFS) -const char * mt_key_int_file_name = "mt_key_int"; -const char * mt_key_str_file_name = "mt_key_str"; +const char mt_key_int_file_name[] = "mt_key_int"; +const char mt_key_str_file_name[] = "mt_key_str"; #if CHIP_PLAT_SAVE_NVM_DATA_ON_IDLE static bool mt_key_int_save_in_flash = false; static bool mt_key_str_save_in_flash = false; diff --git a/src/protocols/Protocols.cpp b/src/protocols/Protocols.cpp index a4ad43013fb5e6..f840bb097249a9 100644 --- a/src/protocols/Protocols.cpp +++ b/src/protocols/Protocols.cpp @@ -24,7 +24,7 @@ namespace chip { namespace Protocols { -static const char * sUnknownTypeName = "----"; +static const char sUnknownTypeName[] = "----"; static const char * LookupMessageTypeName(const MessageTypeNameLookup * lookupTable, size_t tableSize, uint8_t msgType) { diff --git a/src/test_driver/esp32/main/main_app.cpp b/src/test_driver/esp32/main/main_app.cpp index 6045a4f6f63800..e182b278e88c2f 100644 --- a/src/test_driver/esp32/main/main_app.cpp +++ b/src/test_driver/esp32/main/main_app.cpp @@ -36,7 +36,7 @@ using namespace ::chip; using namespace ::chip::DeviceLayer; -const char * TAG = "CHIP-tests"; +const char TAG[] = "CHIP-tests"; static void tester_task(void * pvParameters) { diff --git a/src/tools/chip-cert/CertUtils.cpp b/src/tools/chip-cert/CertUtils.cpp index a8857ae72baa58..cb6e0a1703b434 100644 --- a/src/tools/chip-cert/CertUtils.cpp +++ b/src/tools/chip-cert/CertUtils.cpp @@ -231,14 +231,14 @@ bool HasStringPrefix(const uint8_t * buffer, size_t len, const char * prefix) CertFormat DetectCertFormat(const uint8_t * cert, uint32_t certLen) { static const uint8_t chipRawPrefix[] = { 0x15, 0x30, 0x01 }; - static const char * chipHexPrefix = "153001"; - static const char * chipB64Prefix = "FTAB"; + static const char chipHexPrefix[] = "153001"; + static const char chipB64Prefix[] = "FTAB"; static const uint8_t chipCompactPdcRawPrefix[] = { 0x15, 0x30, 0x09 }; - static const char * chipCompactPdcHexPrefix = "153009"; - static const char * chipCompactPdcB64Prefix = "FTAJ"; + static const char chipCompactPdcHexPrefix[] = "153009"; + static const char chipCompactPdcB64Prefix[] = "FTAJ"; static const uint8_t derRawPrefix[] = { 0x30, 0x82 }; - static const char * derHexPrefix = "30820"; - static const char * pemMarker = "-----BEGIN CERTIFICATE-----"; + static const char derHexPrefix[] = "30820"; + static const char pemMarker[] = "-----BEGIN CERTIFICATE-----"; VerifyOrReturnError(cert != nullptr, kCertFormat_Unknown); diff --git a/src/tools/chip-cert/Cmd_PrintCD.cpp b/src/tools/chip-cert/Cmd_PrintCD.cpp index bdb511850ac7cc..7463049f142c04 100644 --- a/src/tools/chip-cert/Cmd_PrintCD.cpp +++ b/src/tools/chip-cert/Cmd_PrintCD.cpp @@ -135,8 +135,8 @@ CDFormat DetectCDFormat(const uint8_t * cd, uint32_t cdLen) { static const uint8_t cdRawPrefix1[] = { 0x30, 0x81 }; static const uint8_t cdRawPrefix2[] = { 0x30, 0x82 }; - static const char * cdHexPrefix = "308"; - static const char * cdB64Prefix = "MI"; + static const char cdHexPrefix[] = "308"; + static const char cdB64Prefix[] = "MI"; VerifyOrReturnError(cd != nullptr, kCDFormat_Unknown); diff --git a/src/tools/chip-cert/KeyUtils.cpp b/src/tools/chip-cert/KeyUtils.cpp index fcc2e567724a9a..a52359c0f5706c 100644 --- a/src/tools/chip-cert/KeyUtils.cpp +++ b/src/tools/chip-cert/KeyUtils.cpp @@ -44,13 +44,13 @@ KeyFormat DetectKeyFormat(const uint8_t * key, uint32_t keyLen) { static uint32_t p256SerializedKeypairLen = kP256_PublicKey_Length + kP256_PrivateKey_Length; static const uint8_t chipRawPrefix[] = { 0x04 }; - static const char * chipHexPrefix = "04"; - static const char * chipB64Prefix = "B"; + static const char chipHexPrefix[] = "04"; + static const char chipB64Prefix[] = "B"; static const uint8_t derRawPrefix[] = { 0x30, 0x77, 0x02, 0x01, 0x01, 0x04 }; - static const char * derHexPrefix = "307702010104"; - static const char * ecPEMMarker = "-----BEGIN EC PRIVATE KEY-----"; - static const char * pkcs8PEMMarker = "-----BEGIN PRIVATE KEY-----"; - static const char * ecPUBPEMMarker = "-----BEGIN PUBLIC KEY-----"; + static const char derHexPrefix[] = "307702010104"; + static const char ecPEMMarker[] = "-----BEGIN EC PRIVATE KEY-----"; + static const char pkcs8PEMMarker[] = "-----BEGIN PRIVATE KEY-----"; + static const char ecPUBPEMMarker[] = "-----BEGIN PUBLIC KEY-----"; VerifyOrReturnError(key != nullptr, kKeyFormat_Unknown);