diff --git a/src/platform/ESP32/Logging.cpp b/src/platform/ESP32/Logging.cpp index 07ec4a1690bd40..e8e53aa9e6275d 100644 --- a/src/platform/ESP32/Logging.cpp +++ b/src/platform/ESP32/Logging.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include @@ -19,7 +18,7 @@ namespace chip { namespace Logging { namespace Platform { -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { char tag[11]; diff --git a/src/platform/Linux/Logging.cpp b/src/platform/Linux/Logging.cpp index 28a19a6a30ca28..25e132e1a12b76 100644 --- a/src/platform/Linux/Logging.cpp +++ b/src/platform/Linux/Logging.cpp @@ -1,9 +1,9 @@ /* See Project CHIP LICENSE file for licensing information. */ +#include + #include -#include #include -#include #include #include @@ -35,7 +35,7 @@ namespace Platform { /** * CHIP log output functions. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { struct timeval tv; diff --git a/src/platform/NuttX/Logging.cpp b/src/platform/NuttX/Logging.cpp index e10ec76d0a9c12..ea95fdc4fbc7ef 100644 --- a/src/platform/NuttX/Logging.cpp +++ b/src/platform/NuttX/Logging.cpp @@ -1,9 +1,9 @@ /* See Project CHIP LICENSE file for licensing information. */ +#include + #include -#include #include -#include #include #include @@ -35,7 +35,7 @@ namespace Platform { /** * CHIP log output functions. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { struct timeval tv; diff --git a/src/platform/Tizen/Logging.cpp b/src/platform/Tizen/Logging.cpp index a228c8ef2b61c5..cfedc7fd56d031 100644 --- a/src/platform/Tizen/Logging.cpp +++ b/src/platform/Tizen/Logging.cpp @@ -15,15 +15,15 @@ * limitations under the License. */ +#include + #include #include #include #include -#include #include -#include namespace chip { namespace Logging { @@ -32,7 +32,7 @@ namespace Platform { /** * CHIP log output functions. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { static constexpr char kLogTag[] = "CHIP"; diff --git a/src/platform/Zephyr/Logging.cpp b/src/platform/Zephyr/Logging.cpp index 4f7322534e331e..a5c1ad7b063d03 100644 --- a/src/platform/Zephyr/Logging.cpp +++ b/src/platform/Zephyr/Logging.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include @@ -42,7 +41,7 @@ namespace Platform { * CHIP log output function. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; snprintfcb(formattedMsg, sizeof(formattedMsg), "[%s]", module); diff --git a/src/platform/logging/impl/android/Logging.cpp b/src/platform/logging/impl/android/Logging.cpp index fc6433113bd740..404c76f803ba12 100644 --- a/src/platform/logging/impl/android/Logging.cpp +++ b/src/platform/logging/impl/android/Logging.cpp @@ -1,16 +1,16 @@ /* See Project chip LICENSE file for licensing information. */ -#include -#include #include +#include + #include namespace chip { namespace Logging { namespace Platform { -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { int priority = (category == kLogCategory_Error) ? ANDROID_LOG_ERROR : ANDROID_LOG_DEBUG; __android_log_vprint(priority, module, msg, v); diff --git a/src/platform/logging/impl/stdio/Logging.cpp b/src/platform/logging/impl/stdio/Logging.cpp index 6eceebb2e961df..c403c29b913293 100644 --- a/src/platform/logging/impl/stdio/Logging.cpp +++ b/src/platform/logging/impl/stdio/Logging.cpp @@ -1,16 +1,16 @@ /* See Project CHIP LICENSE file for licensing information. */ -#include -#include #include +#include + #include namespace chip { namespace Logging { namespace Platform { -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { printf("CHIP:%s: ", module); vprintf(msg, v); diff --git a/src/platform/logging/impl/stdio/darwin/Logging.cpp b/src/platform/logging/impl/stdio/darwin/Logging.cpp index f5599f5996b570..49c58eea1d7bba 100644 --- a/src/platform/logging/impl/stdio/darwin/Logging.cpp +++ b/src/platform/logging/impl/stdio/darwin/Logging.cpp @@ -15,10 +15,10 @@ * limitations under the License. */ +#include + #include -#include #include -#include #include #include #include @@ -28,7 +28,7 @@ namespace chip { namespace Logging { namespace Platform { -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { timeval time; gettimeofday(&time, nullptr); diff --git a/src/platform/mbed/Logging.cpp b/src/platform/mbed/Logging.cpp index 1b85d2c0ec8d7b..0e03fa81259520 100644 --- a/src/platform/mbed/Logging.cpp +++ b/src/platform/mbed/Logging.cpp @@ -21,15 +21,15 @@ * Logging implementation for Mbed platform */ -#include -#include -#include -#include #include #include #include +#include +#include +#include + #include "mbed-trace/mbed_trace.h" #ifdef MBED_TRACE_FILTER_LENGTH @@ -66,7 +66,7 @@ char logMsgBuffer[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; /** * CHIP log output functions. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { size_t prefixLen = 0; snprintf(logMsgBuffer, sizeof(logMsgBuffer), "[%s]", module); diff --git a/src/platform/nxp/k32w/k32w0/Logging.cpp b/src/platform/nxp/k32w/k32w0/Logging.cpp index 5fc5b64d4404d9..2a9c0816b0facd 100644 --- a/src/platform/nxp/k32w/k32w0/Logging.cpp +++ b/src/platform/nxp/k32w/k32w0/Logging.cpp @@ -2,7 +2,9 @@ #include +#include #include + #include #include #include @@ -10,7 +12,6 @@ #include #include "fsl_debug_console.h" -#include #define K32W_LOG_MODULE_NAME chip #define EOL_CHARS "\r\n" /* End of Line Characters */ @@ -128,7 +129,7 @@ namespace Platform { /** * CHIP log output function. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { (void) module; (void) category; diff --git a/src/platform/nxp/k32w/k32w1/Logging.cpp b/src/platform/nxp/k32w/k32w1/Logging.cpp index 5c68f4f11dab7a..8f8aedd66741f8 100644 --- a/src/platform/nxp/k32w/k32w1/Logging.cpp +++ b/src/platform/nxp/k32w/k32w1/Logging.cpp @@ -146,7 +146,7 @@ namespace Platform { /** * CHIP log output function. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { (void) module; (void) category; diff --git a/src/platform/openiotsdk/Logging.cpp b/src/platform/openiotsdk/Logging.cpp index bc51e4e44d6570..fad4c8470221c0 100644 --- a/src/platform/openiotsdk/Logging.cpp +++ b/src/platform/openiotsdk/Logging.cpp @@ -22,11 +22,11 @@ * for Open IOT SDK platform. */ +#include + #include -#include #include #include -#include #include #include @@ -50,7 +50,7 @@ namespace Platform { /** * CHIP log output functions. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { char logMsgBuffer[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; diff --git a/src/platform/qpg/Logging.cpp b/src/platform/qpg/Logging.cpp index 8a30a63210f622..549b92b9df5908 100644 --- a/src/platform/qpg/Logging.cpp +++ b/src/platform/qpg/Logging.cpp @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -67,7 +66,7 @@ static size_t AddTimeStampAndPrefixStr(char * logBuffer, const char * prefix, si * CHIP log output function. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; size_t formattedMsgLen; diff --git a/src/platform/webos/Logging.cpp b/src/platform/webos/Logging.cpp index 08929b94f88a65..6d4ceb91ea3579 100644 --- a/src/platform/webos/Logging.cpp +++ b/src/platform/webos/Logging.cpp @@ -1,7 +1,5 @@ /* See Project CHIP LICENSE file for licensing information. */ -#include -#include #include #include @@ -10,6 +8,8 @@ #include #include +#include + #ifdef USE_SYSLOG #include #endif @@ -33,7 +33,7 @@ namespace Platform { /** * CHIP log output functions. */ -void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v) +void LogV(const char * module, uint8_t category, const char * msg, va_list v) { struct timeval tv;