Skip to content

Commit

Permalink
lib: os: cbprintf: Aligning types
Browse files Browse the repository at this point in the history
size_t was mixed with ints which cause warnings in cpp

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch authored and nashif committed Apr 22, 2021
1 parent f16f37f commit c22df64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/sys/cbprintf_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ extern "C" {

static inline void cbprintf_wcpy(int *dst, int *src, size_t len)
{
for (int i = 0; i < len; i++) {
for (size_t i = 0; i < len; i++) {
dst[i] = src[i];
}
}
Expand Down Expand Up @@ -301,7 +301,7 @@ do { \
"Buffer must be aligned."); \
} \
uint8_t *_pbuf = buf; \
int _pmax = (buf != NULL) ? _inlen : INT32_MAX; \
size_t _pmax = (buf != NULL) ? _inlen : SIZE_MAX; \
int _pkg_len = 0; \
int _pkg_offset = _align_offset; \
union z_cbprintf_hdr *_len_loc; \
Expand Down

0 comments on commit c22df64

Please sign in to comment.