fix compilation with GCC12

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2022-06-08 18:16:57 -07:00 committed by Nick Hainke
parent 2ac7b9d408
commit 850a75c182
2 changed files with 1 additions and 11 deletions

View file

@ -70,11 +70,6 @@ void *receive_msg(void *args) {
continue; continue;
} }
// TODO: recv_string is a fixed array. Should test be here?
if (recv_string == NULL) {
return 0;
}
if (strlen(recv_string) <= 0) { if (strlen(recv_string) <= 0) {
return 0; return 0;
} }
@ -93,11 +88,6 @@ void *receive_msg_enc(void *args) {
continue; continue;
} }
// TODO: recv_string is a fixed array. Should test be here?
if (recv_string == NULL) {
return 0;
}
if (strlen(recv_string) <= 0) { if (strlen(recv_string) <= 0) {
return 0; return 0;
} }

View file

@ -33,7 +33,7 @@ void* ret = NULL;
case DAWN_REALLOC: case DAWN_REALLOC:
ret = realloc(ptr, size); ret = realloc(ptr, size);
if (ret != NULL) if (ret != NULL)
dawn_memory_unregister(DAWN_REALLOC, file, line, ptr); dawn_memory_unregister(DAWN_REALLOC, file, line, ret);
break; break;
case DAWN_CALLOC: case DAWN_CALLOC:
ret = calloc(nmemb, size); ret = calloc(nmemb, size);