Commit dd4d6541 authored by Lluis Campos's avatar Lluis Campos Committed by Jamie
Browse files

boot_serial: Fix `incompatible-pointer-types` warning

The variable `rc` was declared as int and then implicitly casted to
`size_t` when passed to `base64_decode`, which on 64 bit architectures
is wrong.

Signed-off-by: default avatarLluis Campos <lluis.campos@northern.tech>
parent ebf60e03
Loading
Loading
Loading
Loading
+2 −2
Changes for boot/boot_serial/src/boot_serial.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1283,7 +1283,7 @@ boot_serial_output(void)
static int
boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout)
{
    int rc;
    size_t rc;
    uint16_t crc;
    uint16_t len;

@@ -1295,7 +1295,7 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout)
    }
#elif __ESPRESSIF__
    int err;
    err = base64_decode((unsigned char *)&out[*out_off], maxout - *out_off, (size_t *)&rc, (unsigned char *)in, inlen);
    err = base64_decode((unsigned char *)&out[*out_off], maxout - *out_off, &rc, (unsigned char *)in, inlen);
    if (err) {
        return -1;
    }