From 8402dba0d9ec67619a801284d95fd40d6c438b60 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Sat, 6 Jul 2024 12:11:36 +0800 Subject: [PATCH] Util (Base64): silence compiler warnings --- src/util/base64.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/util/base64.c b/src/util/base64.c index 866d59428..0fbcb41e6 100644 --- a/src/util/base64.c +++ b/src/util/base64.c @@ -37,7 +37,7 @@ void ffBase64EncodeRaw(uint32_t size, const char *str, uint32_t *out_size, char *out_size = (uint32_t)(out - output); } -static char decode_table[256]; +static uint8_t decode_table[256]; void init_decode_table() { @@ -59,10 +59,7 @@ void init_decode_table() } while (ch++ < 0xFF); } -#define next_char(x) \ - char x = decode_table[(unsigned char)*str++]; \ - if (x < 0) \ - return false; +#define next_char(x) uint8_t x = decode_table[(uint8_t) *str++]; bool ffBase64DecodeRaw(uint32_t size, const char *str, uint32_t *out_size, char *output) {