Skip to content

Commit

Permalink
boot_serial: Fix build for 64-bit architectures
Browse files Browse the repository at this point in the history
Typecasting pointer variables to uint32_t
instead of uintptr_t was causing build error
on 64-bit architecture.

This is useful, because I am currently working
on implementing support for 64-bit native target
in Apache Mynewt. There is unit test for boot_serial
and it cannot be compiled without this changes.

Signed-off-by: Michal Gorecki <michal.gorecki@codecoup.pl>
  • Loading branch information
m-gorecki authored and nordicjm committed Jul 26, 2023
1 parent 76d19b3 commit 5404130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boot/boot_serial/src/boot_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ boot_serial_output(void)
char encoded_buf[BASE64_ENCODE_SIZE(sizeof(buf))];

data = bs_obuf;
len = (uint32_t)cbor_state->payload_mut - (uint32_t)bs_obuf;
len = (uintptr_t)cbor_state->payload_mut - (uintptr_t)bs_obuf;

bs_hdr->nh_op++;
bs_hdr->nh_flags = 0;
Expand Down

0 comments on commit 5404130

Please sign in to comment.