g++ warning fixes

pull/444/head
JacobBarthelmeh 2022-08-22 17:31:02 -06:00
parent 1f280647c8
commit 0a93923067
1 changed files with 3 additions and 3 deletions

View File

@ -479,7 +479,7 @@ static int HandleInclude(WOLFSSHD_CONFIG *conf, const char *value)
struct dirent *dir;
DIR *d;
char *path;
char *filepath = WMALLOC(PATH_MAX, NULL, 0);
char *filepath = (char*)WMALLOC(PATH_MAX, NULL, 0);
/* Back find the full path */
while (ptr2 != value) {
@ -490,13 +490,13 @@ static int HandleInclude(WOLFSSHD_CONFIG *conf, const char *value)
}
if (ptr2 != value) {
path = WMALLOC(ptr2 - value + 1, NULL, 0);
path = (char*)WMALLOC(ptr2 - value + 1, NULL, 0);
memcpy(path, value, ptr2 - value);
path[ptr2 - value] = '\0';
prefix = ptr2 + 1;
prefixLen = (int)(ptr - ptr2 - 1);
} else {
path = WMALLOC(2, NULL, 0);
path = (char*)WMALLOC(2, NULL, 0);
memcpy(path, ".", 1);
path[1] = '\0';
prefix = value;