Fix gcc 15 -Wunterminated-string-initialization

* libwget/base64.c (base64_encode): Drop explicit error length.
* libwget/buffer_printf.c (convert_pointer): Likewise.

Just cosmetics - allows to build with -Werror.
This commit is contained in:
Tim Rühsen
2025-11-09 19:43:21 +01:00
parent b02444a10a
commit 18165409bb
2 changed files with 3 additions and 3 deletions

View File

@ -170,9 +170,9 @@ char *wget_base64_decode_alloc(const char *src, size_t n, size_t *outlen)
static size_t base64_encode(char *dst, const char *src, size_t n, int flags)
{
static const char base64unsafe[64] =
static const char base64unsafe[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char base64urlsafe[64] =
static const char base64urlsafe[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
const char *base64 = (flags & WGET_BASE64_URLENCODE) ? base64urlsafe : base64unsafe;

View File

@ -233,7 +233,7 @@ static void convert_dec(wget_buffer *buf, unsigned int flags, int field_width, i
static void convert_pointer(wget_buffer *buf, void *pointer)
{
static const char HEX[16] = "0123456789abcdef";
static const char HEX[] = "0123456789abcdef";
char str[32]; // long enough to hold hexadecimal pointer
char *dst;
int length;