forked from wolfSSL/wolfssl
Merge pull request #1792 from SparkiDev/gcc_8_fixes
GCC 8 new warnings in -Wall fix
This commit is contained in:
@@ -10391,8 +10391,8 @@ int wolfSSL_check_domain_name(WOLFSSL* ssl, const char* dn)
|
||||
ssl->buffers.domainName.length + 1, ssl->heap, DYNAMIC_TYPE_DOMAIN);
|
||||
|
||||
if (ssl->buffers.domainName.buffer) {
|
||||
char* domainName = (char*)ssl->buffers.domainName.buffer;
|
||||
XSTRNCPY(domainName, dn, ssl->buffers.domainName.length);
|
||||
unsigned char* domainName = ssl->buffers.domainName.buffer;
|
||||
XMEMCPY(domainName, dn, ssl->buffers.domainName.length);
|
||||
domainName[ssl->buffers.domainName.length] = '\0';
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
|
@@ -929,10 +929,10 @@ WOLFSSL_API int wolfSSL_EVP_SignUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data
|
||||
/* Helper function for getting the NID value from md
|
||||
*
|
||||
* returns the NID value associated with md on success */
|
||||
static int md2nid(int md)
|
||||
static int md2nid(const unsigned char md)
|
||||
{
|
||||
const char * d;
|
||||
d = (const char *)wolfSSL_EVP_get_md((const unsigned char)md);
|
||||
d = (const char *)wolfSSL_EVP_get_md(md);
|
||||
if (XSTRNCMP(d, "SHA", 3) == 0) {
|
||||
if (XSTRLEN(d) > 3) {
|
||||
if (XSTRNCMP(d, "SHA256", 6) == 0) {
|
||||
|
@@ -19973,8 +19973,9 @@ int memcb_test(void)
|
||||
b = NULL;
|
||||
|
||||
/* Use API. */
|
||||
if (wolfSSL_SetAllocators((wolfSSL_Malloc_cb)&my_Malloc_cb,
|
||||
(wolfSSL_Free_cb)&my_Free_cb, (wolfSSL_Realloc_cb)my_Realloc_cb) != 0) {
|
||||
if (wolfSSL_SetAllocators((wolfSSL_Malloc_cb)(void*)&my_Malloc_cb,
|
||||
(wolfSSL_Free_cb)(void*)&my_Free_cb,
|
||||
(wolfSSL_Realloc_cb)(void*)&my_Realloc_cb) != 0) {
|
||||
ERROR_OUT(-10005, exit_memcb);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user