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 <fabiobaltieri@google.com>
This commit is contained in:
parent
8bd369953a
commit
6114a72c38
1 changed files with 4 additions and 4 deletions
|
|
@ -46,22 +46,22 @@ extern "C"
|
||||||
/* Logging functions when using LittleFS with Zephyr. */
|
/* Logging functions when using LittleFS with Zephyr. */
|
||||||
#ifndef LFS_TRACE
|
#ifndef LFS_TRACE
|
||||||
#ifdef LFS_YES_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
|
#else
|
||||||
#define LFS_TRACE(...)
|
#define LFS_TRACE(...)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LFS_DEBUG
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef LFS_WARN
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef LFS_ERROR
|
#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
|
#endif
|
||||||
|
|
||||||
/* Runtime assertions */
|
/* Runtime assertions */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue