From: Rusty Russell Date: Wed, 6 Jul 2022 05:10:20 +0000 (+0930) Subject: ccan/base64: fix GCC warning. X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=52b86922f8466e4641b55ba17eab56522b46e6f4;p=ccan ccan/base64: fix GCC warning. ``` ccan/ccan/base64/base64.c:146:71: error: argument 2 of type ‘char[3]’ with mismatched bound [-Werror=array-parameter=] 146 | ssize_t base64_decode_tail_using_maps(const base64_maps_t *maps, char dest[3], | ~~~~~^~~~~~~ In file included from ccan/ccan/base64/base64.c:2: ccan/ccan/base64/base64.h:119:72: note: previously declared as ‘char *’ 119 | ssize_t base64_decode_tail_using_maps(const base64_maps_t *maps, char *dest, | ~~~~~~^~~~ cc1: all warnings being treated as errors make: *** [Makefile:817: ccan-base64.o] Error 1 ``` Signed-off-by: Rusty Russell --- diff --git a/ccan/base64/base64.h b/ccan/base64/base64.h index cef30d25..a899af4a 100644 --- a/ccan/base64/base64.h +++ b/ccan/base64/base64.h @@ -116,7 +116,7 @@ ssize_t base64_decode_quartet_using_maps(const base64_maps_t *maps, * @note sets errno = EDOM if src contains invalid characters * @note sets errno = EINVAL if src is an invalid base64 tail */ -ssize_t base64_decode_tail_using_maps(const base64_maps_t *maps, char *dest, +ssize_t base64_decode_tail_using_maps(const base64_maps_t *maps, char dest[3], const char *src, size_t srclen);