sys: util: Deprecate GET_ARGS_LESS_1 macro
GET_ARGS_LESS_N must be used instead. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
dd9da9c8c4
commit
b8781e27b0
3 changed files with 7 additions and 4 deletions
|
@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(clock_control, CONFIG_CLOCK_CONTROL_LOG_LEVEL);
|
|||
LOG_##lvl("%s: " GET_ARG_N(1, __VA_ARGS__), \
|
||||
get_sub_config(dev, (enum clock_control_nrf_type)subsys)->name \
|
||||
COND_CODE_0(NUM_VA_ARGS_LESS_1(__VA_ARGS__),\
|
||||
(), (, GET_ARGS_LESS_1(__VA_ARGS__))))
|
||||
(), (, GET_ARGS_LESS_N(1, __VA_ARGS__))))
|
||||
#else
|
||||
#define CLOCK_LOG(...)
|
||||
#endif
|
||||
|
|
|
@ -155,7 +155,7 @@ extern "C" {
|
|||
#define Z_LOG_STR(...) "%s: " GET_ARG_N(1, __VA_ARGS__), __func__\
|
||||
COND_CODE_0(NUM_VA_ARGS_LESS_1(__VA_ARGS__),\
|
||||
(),\
|
||||
(, GET_ARGS_LESS_1(__VA_ARGS__))\
|
||||
(, GET_ARGS_LESS_N(1, __VA_ARGS__))\
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -566,8 +566,11 @@ uint8_t u8_to_dec(char *buf, uint8_t buflen, uint8_t value);
|
|||
*/
|
||||
#define GET_ARG2(...) __DEPRECATED GET_ARG_N(2, __VA_ARGS__)
|
||||
|
||||
/** @brief Expands to all arguments except the first one (@p val) */
|
||||
#define GET_ARGS_LESS_1(val, ...) __VA_ARGS__
|
||||
/** Expands to all arguments except the first one.
|
||||
*
|
||||
* @deprecated Use GET_ARGS_LESS_N instead.
|
||||
*/
|
||||
#define GET_ARGS_LESS_1(...) __DEPRECATED GET_ARGS_LESS_N(1, __VA_ARGS__)
|
||||
|
||||
/**
|
||||
* @brief Like <tt>a || b</tt>, but does evaluation and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue