Skip to content

Commit

Permalink
[umf] Fix macOS build
Browse files Browse the repository at this point in the history
The AppleClang compiler emits warnings in C functions with zero
arguments that are not specified as `f(void)`.
  • Loading branch information
kbenzie committed Sep 11, 2023
1 parent 2c533e6 commit 065edc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions source/common/unified_malloc_framework/src/memory_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@

#if !defined(_WIN32)
critnib *TRACKER = NULL;
void __attribute__((constructor)) createLibTracker() {
void __attribute__((constructor)) createLibTracker(void) {
TRACKER = critnib_new();
}
void __attribute__((destructor)) deleteLibTracker() { critnib_delete(TRACKER); }
void __attribute__((destructor)) deleteLibTracker(void) {
critnib_delete(TRACKER);
}

umf_memory_tracker_handle_t umfMemoryTrackerGet(void) {
return (umf_memory_tracker_handle_t)TRACKER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "utils.h"

struct os_mutex_t *util_mutex_create() {
struct os_mutex_t *util_mutex_create(void) {
pthread_mutex_t *mutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
int ret = pthread_mutex_init(mutex, NULL);
return ret == 0 ? ((struct os_mutex_t *)mutex) : NULL;
Expand Down

0 comments on commit 065edc1

Please sign in to comment.