From 6114a72c384511d217ae7730e3eb74b5de518084 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Wed, 31 Aug 2022 19:04:49 +0000 Subject: [PATCH] modules: littlefs: use ##__VA_ARGS__ for littlefs log wrappers LittleFS has some macros resolving to the Zephyr LOG_* ones, use the ##__VA_ARGS__ for these so that they don't leave a trailing comma if called with a single argument. Signed-off-by: Fabio Baltieri --- modules/littlefs/zephyr_lfs_config.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/littlefs/zephyr_lfs_config.h b/modules/littlefs/zephyr_lfs_config.h index 46e97689a8e..80e81987557 100644 --- a/modules/littlefs/zephyr_lfs_config.h +++ b/modules/littlefs/zephyr_lfs_config.h @@ -46,22 +46,22 @@ extern "C" /* Logging functions when using LittleFS with Zephyr. */ #ifndef LFS_TRACE #ifdef LFS_YES_TRACE -#define LFS_TRACE(fmt, ...) LOG_DBG("%s:%d:trace: " fmt, __FILE__, __LINE__, __VA_ARGS__) +#define LFS_TRACE(fmt, ...) LOG_DBG("%s:%d:trace: " fmt, __FILE__, __LINE__, ##__VA_ARGS__) #else #define LFS_TRACE(...) #endif #endif #ifndef LFS_DEBUG -#define LFS_DEBUG(fmt, ...) LOG_DBG("%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__) +#define LFS_DEBUG(fmt, ...) LOG_DBG("%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__) #endif #ifndef LFS_WARN -#define LFS_WARN(fmt, ...) LOG_WRN("%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__) +#define LFS_WARN(fmt, ...) LOG_WRN("%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__) #endif #ifndef LFS_ERROR -#define LFS_ERROR(fmt, ...) LOG_ERR("%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__) +#define LFS_ERROR(fmt, ...) LOG_ERR("%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__) #endif /* Runtime assertions */