mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-01-14 02:01:39 +00:00
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:
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user