diff options
| author | Jeff King <peff@peff.net> | 2024-08-28 00:00:16 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-28 09:51:18 -0700 |
| commit | b652382d761607c76258e2e91fa753dffe5c21dc (patch) | |
| tree | 5cf6da87b6c972a7a114b3b691e042edea65435d /compat/win32/pthread.h | |
| parent | 141491840d4efb0a24430eea6815dc8164786820 (diff) | |
| download | git-b652382d761607c76258e2e91fa753dffe5c21dc.tar.xz | |
compat: mark unused parameters in win32/mingw functions
The compat/ directory contains many stub functions, wrappers, and so on
that have to conform to a specific interface, but don't necessarily need
to use all of their parameters. Let's mark them to avoid complaints from
-Wunused-parameter.
This was done mostly via guess-and-check with the Windows build in
GitHub CI. I also confirmed that the win+VS build is similarly happy.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/win32/pthread.h')
| -rw-r--r-- | compat/win32/pthread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h index cc3221cb2c..e2b5c4f64c 100644 --- a/compat/win32/pthread.h +++ b/compat/win32/pthread.h @@ -18,7 +18,7 @@ */ #define pthread_mutex_t CRITICAL_SECTION -static inline int return_0(int i) { +static inline int return_0(int i UNUSED) { return 0; } #define pthread_mutex_init(a,b) return_0((InitializeCriticalSection((a)), 0)) @@ -70,7 +70,7 @@ static inline void NORETURN pthread_exit(void *ret) } typedef DWORD pthread_key_t; -static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(void *value)) +static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(void *value) UNUSED) { return (*keyp = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0; } |
