From 8874670463276073fe6cdb0bccd0d9a9a982b4c5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Dec 2024 10:06:03 -0500 Subject: Fix clang and clang-tidy warnings on Windows --- src/path.c | 2 +- src/posix/filesystem_posix.c | 4 ++++ src/posix/sem_posix.c | 3 +++ src/win32/win32_util.h | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/path.c b/src/path.c index 7e67af6..2240031 100644 --- a/src/path.c +++ b/src/path.c @@ -1,4 +1,4 @@ -// Copyright 2007-2022 David Robillard +// Copyright 2007-2024 David Robillard // SPDX-License-Identifier: ISC #include diff --git a/src/posix/filesystem_posix.c b/src/posix/filesystem_posix.c index bb398c1..ea091e0 100644 --- a/src/posix/filesystem_posix.c +++ b/src/posix/filesystem_posix.c @@ -341,6 +341,9 @@ zix_canonical_path(ZixAllocator* const allocator, const char* const path) } zix_free(allocator, buffer); + +#else + (void)allocator; #endif return NULL; @@ -449,6 +452,7 @@ zix_current_path(ZixAllocator* const allocator) return current; #else + (void)allocator; return NULL; #endif diff --git a/src/posix/sem_posix.c b/src/posix/sem_posix.c index ea49db9..5b14e37 100644 --- a/src/posix/sem_posix.c +++ b/src/posix/sem_posix.c @@ -61,6 +61,9 @@ zix_sem_timed_wait(ZixSem* sem, { #if !USE_CLOCK_GETTIME || !USE_SEM_TIMEDWAIT + (void)sem; + (void)seconds; + (void)nanoseconds; return ZIX_STATUS_NOT_SUPPORTED; #else diff --git a/src/win32/win32_util.h b/src/win32/win32_util.h index 3123ef4..3ae2e2b 100644 --- a/src/win32/win32_util.h +++ b/src/win32/win32_util.h @@ -14,11 +14,11 @@ typedef const char ArgPathChar; /// Copy and convert a path argument if necessary ArgPathChar* -arg_path_new(ZixAllocator* const allocator, const char* const path); +arg_path_new(ZixAllocator* allocator, const char* path); /// Free a path from arg_path_new() if necessary void -arg_path_free(ZixAllocator* const allocator, ArgPathChar* const path); +arg_path_free(ZixAllocator* allocator, ArgPathChar* path); /// Convert from (user) UTF-8 to (Windows) UTF-16 wchar_t* -- cgit v1.2.1