Skip to content

Commit

Permalink
jsonrpcs: cast to long long int to print value without warning
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 10, 2023
1 parent 4645585 commit d7c00bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/jsonrpcs/jsonrpcs_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ static int jsonrpc_send_mode(jsonrpc_ctx_t* ctx, int mode)
srjson_AddNumberToObject(ctx->jrpl, ctx->jrpl->root, "id",
nj->valuedouble);
if(mode==1) {
snprintf(_jsonrpcs_stored_id, 62, "%lld", (int64_t)nj->valuedouble);
snprintf(_jsonrpcs_stored_id, 62, "%lld",
(long long int)nj->valuedouble);
}
}
}
Expand Down

0 comments on commit d7c00bc

Please sign in to comment.