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: Lluis Campos <lluis.campos@northern.tech>
(cherry picked from commit dd4d6541c8
)
This commit is contained in:
parent
60ac682a12
commit
157547c889
|
@ -1133,7 +1133,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;
|
||||
|
||||
|
@ -1145,7 +1145,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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue