summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-12-06 09:46:41 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-02-06 15:44:44 +0100
commitd75d9bdee6e65cb005c59b02ecac996affb61d62 (patch)
tree39c365c5bd22520f292acdb4dddf9cfe7cec2b56
parent77bfb0cf1db4eade1b86ceadee9018fdfa1f0820 (diff)
downloadgnutls-d75d9bdee6e65cb005c59b02ecac996affb61d62.tar.gz
nettle base64_encode_raw: use cast to avoid warnings
Nettle switched prototypes for base64_encode_raw() as follows: -base64_encode_raw(uint8_t *dst, size_t length, const uint8_t *src); +base64_encode_raw(char *dst, size_t length, const uint8_t *src); That means we need to cast fist param to void if we want to avoid warnings on different platforms. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/str.c2
-rw-r--r--lib/verify-tofu.c2
-rw-r--r--lib/x509_b64.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/str.c b/lib/str.c
index e10ecd4802..fe6bf71661 100644
--- a/lib/str.c
+++ b/lib/str.c
@@ -898,7 +898,7 @@ _gnutls_buffer_base64print(gnutls_buffer_st * str,
return gnutls_assert_val(ret);
}
- base64_encode_raw(&str->data[str->length], len, data);
+ base64_encode_raw((void*)&str->data[str->length], len, data);
str->length += b64len;
str->data[str->length] = 0;
diff --git a/lib/verify-tofu.c b/lib/verify-tofu.c
index 942d692650..310778629b 100644
--- a/lib/verify-tofu.c
+++ b/lib/verify-tofu.c
@@ -370,7 +370,7 @@ static int raw_pubkey_to_base64(const gnutls_datum_t * raw,
if (b64->data == NULL)
return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
- base64_encode_raw(b64->data, raw->size, raw->data);
+ base64_encode_raw((void*)b64->data, raw->size, raw->data);
b64->size = size;
return 0;
diff --git a/lib/x509_b64.c b/lib/x509_b64.c
index 218f98a3ce..9a1037405b 100644
--- a/lib/x509_b64.c
+++ b/lib/x509_b64.c
@@ -102,7 +102,7 @@ _gnutls_fbase64_encode(const char *msg, const uint8_t * data,
if (sizeof(tmpres) < size)
return gnutls_assert_val(GNUTLS_E_BASE64_ENCODING_ERROR);
- base64_encode_raw(tmpres, tmp, &data[i]);
+ base64_encode_raw((void*)tmpres, tmp, &data[i]);
INCR(bytes, size + 1, max);
ptr = &result->data[pos];
@@ -282,7 +282,7 @@ _gnutls_base64_decode(const uint8_t * data, size_t data_size,
}
ret = base64_decode_update(&ctx, &size, result->data,
- pdata.size, pdata.data);
+ pdata.size, (void*)pdata.data);
if (ret == 0 || size == 0) {
gnutls_assert();
ret = GNUTLS_E_BASE64_DECODING_ERROR;