lib: os: cbprintf: Add ARG_UNUSED to unused arguments
Picky C++ compilation reported warnings that input arguments are not used. Adding missing ARG_UNUSED(). Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
81f0f4efd0
commit
281a9407c5
1 changed files with 17 additions and 0 deletions
|
@ -61,11 +61,15 @@ static inline int z_cbprintf_cxx_is_pchar(T arg)
|
||||||
/* C++ version for calculating argument size. */
|
/* C++ version for calculating argument size. */
|
||||||
static inline size_t z_cbprintf_cxx_arg_size(float f)
|
static inline size_t z_cbprintf_cxx_arg_size(float f)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(f);
|
||||||
|
|
||||||
return sizeof(double);
|
return sizeof(double);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t z_cbprintf_cxx_arg_size(void *p)
|
static inline size_t z_cbprintf_cxx_arg_size(void *p)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(p);
|
||||||
|
|
||||||
return sizeof(void *);
|
return sizeof(void *);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,38 +140,51 @@ static inline void z_cbprintf_cxx_store_arg(uint8_t *dst, T arg)
|
||||||
/* C++ version for long double detection. */
|
/* C++ version for long double detection. */
|
||||||
static inline int z_cbprintf_cxx_is_longdouble(long double arg)
|
static inline int z_cbprintf_cxx_is_longdouble(long double arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < typename T >
|
template < typename T >
|
||||||
static inline int z_cbprintf_cxx_is_longdouble(T arg)
|
static inline int z_cbprintf_cxx_is_longdouble(T arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* C++ version for caluculating argument alignment. */
|
/* C++ version for caluculating argument alignment. */
|
||||||
static inline size_t z_cbprintf_cxx_alignment(float arg)
|
static inline size_t z_cbprintf_cxx_alignment(float arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
|
|
||||||
return VA_STACK_ALIGN(double);
|
return VA_STACK_ALIGN(double);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t z_cbprintf_cxx_alignment(double arg)
|
static inline size_t z_cbprintf_cxx_alignment(double arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
|
|
||||||
return VA_STACK_ALIGN(double);
|
return VA_STACK_ALIGN(double);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t z_cbprintf_cxx_alignment(long double arg)
|
static inline size_t z_cbprintf_cxx_alignment(long double arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
|
|
||||||
return VA_STACK_ALIGN(long double);
|
return VA_STACK_ALIGN(long double);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t z_cbprintf_cxx_alignment(long long arg)
|
static inline size_t z_cbprintf_cxx_alignment(long long arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
|
|
||||||
return VA_STACK_ALIGN(long long);
|
return VA_STACK_ALIGN(long long);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t z_cbprintf_cxx_alignment(unsigned long long arg)
|
static inline size_t z_cbprintf_cxx_alignment(unsigned long long arg)
|
||||||
{
|
{
|
||||||
|
ARG_UNUSED(arg);
|
||||||
|
|
||||||
return VA_STACK_ALIGN(long long);
|
return VA_STACK_ALIGN(long long);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue