lib: os: cbprintf: Add missing initialization of structure fields

C++ compiliation may generate warning if all fields are not
explicitly initialized. Added explicit initialization to 0.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2021-05-20 12:58:04 +02:00 committed by Kumar Gala
commit 81f0f4efd0

View file

@ -360,7 +360,10 @@ do { \
/* Store length in the header, set number of dumped strings to 0 */ \ /* Store length in the header, set number of dumped strings to 0 */ \
if (_pbuf) { \ if (_pbuf) { \
union z_cbprintf_hdr hdr = { \ union z_cbprintf_hdr hdr = { \
.desc = {.len = (uint8_t)(_pkg_len / sizeof(int)) } \ .desc = { \
.len = (uint8_t)(_pkg_len / sizeof(int)), \
.str_cnt = 0, \
} \
}; \ }; \
*_len_loc = hdr; \ *_len_loc = hdr; \
} \ } \