build: Fixed -Wpedantic issues on macOS

This commit is contained in:
WerWolv 2023-01-04 14:24:07 +01:00
parent f7dd28002e
commit 9a5881fc47
2 changed files with 3 additions and 2 deletions

View File

@ -409,6 +409,7 @@ macro(addBundledLibraries)
set(EXTERN_LIBS_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/lib/external")
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(${EXTERN_LIBS_FOLDER}/imgui)
set_target_properties(imgui PROPERTIES POSITION_INDEPENDENT_CODE ON)

View File

@ -4,7 +4,7 @@
#include <stdlib.h>
#include <Foundation/Foundation.h>
char* getMacExecutableDirectoryPath() {
char* getMacExecutableDirectoryPath(void) {
@autoreleasepool {
const char *pathString = [[[[[NSBundle mainBundle] executableURL] URLByDeletingLastPathComponent] path] UTF8String];
@ -15,7 +15,7 @@
}
}
char* getMacApplicationSupportDirectoryPath() {
char* getMacApplicationSupportDirectoryPath(void) {
@autoreleasepool {
NSError* error = nil;
NSURL* dirUrl = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory