Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zcbor_decode.c: Fix "'num_decode' may be used uninitialized" #376

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/zcbor_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ bool zcbor_present_decode(bool *present,
zcbor_state_t *state,
void *result)
{
size_t num_decode;
size_t num_decode = 0;
bool retval = zcbor_multi_decode(0, 1, &num_decode, decoder, state, result, 0);

zcbor_assert_state(retval, "zcbor_multi_decode should not fail with these parameters.\r\n");
Expand Down