lib: os: cbprintf: Suppress coverity false positive
Coverity is complaining about sizeof(v + 0) and it is used here intentionally to promote variable. Added comment that should suppress this error in the future. Note that this macro will be used in all log messages so without solving it before logging v2 is merged there will be a flood of errors. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
ed20c06908
commit
e5eb1b179d
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ extern "C" {
|
|||
_Generic((v), \
|
||||
float : sizeof(double), \
|
||||
default : \
|
||||
sizeof((v)+0) \
|
||||
/* coverity[bad_sizeof] */ \
|
||||
sizeof((v) + 0) \
|
||||
)
|
||||
|
||||
static inline void cbprintf_wcpy(int *dst, int *src, size_t len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue