net: lwm2m: Prevent snprintk warnings on different platforms

Use explicit casting to long long within `snprintk()` and logger
functions to prevent compiler warnings with different
platforms/toolchins (as 64-bit integer can be either represented
as ld or lld depending on platform).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2022-01-13 13:30:58 +01:00 committed by Carles Cufí
commit 9c8d30f099
2 changed files with 5 additions and 3 deletions

View file

@ -4326,7 +4326,7 @@ static int generate_notify_message(struct lwm2m_ctx *ctx,
obs->path.level,
log_strdup(sprint_token(obs->token, obs->tkl)),
log_strdup(lwm2m_sprint_ip_addr(&ctx->remote_addr)),
k_uptime_get());
(long long)k_uptime_get());
obj_inst = get_engine_obj_inst(obs->path.obj_id,
obs->path.obj_inst_id);