Unverified Commit 4d47ad6f by Edward Thomson Committed by GitHub

Merge pull request #6432 from libgit2/ethomson/noop_args

thread: avoid warnings when building without threads
parents d3f554fd 48850882
...@@ -263,33 +263,34 @@ GIT_INLINE(int64_t) git_atomic64_get(git_atomic64 *a) ...@@ -263,33 +263,34 @@ GIT_INLINE(int64_t) git_atomic64_get(git_atomic64 *a)
#define git_threads_global_init git__noop #define git_threads_global_init git__noop
#define git_thread unsigned int #define git_thread unsigned int
#define git_thread_create(thread, start_routine, arg) git__noop() #define git_thread_create(t, s, a) git__noop(t, s, a)
#define git_thread_join(id, status) git__noop() #define git_thread_join(i, s) git__noop_args(i, s)
/* Pthreads Mutex */ /* Pthreads Mutex */
#define git_mutex unsigned int #define git_mutex unsigned int
#define git_mutex_init(a) git__noop() #define git_mutex_init(a) git__noop_args(a)
#define git_mutex_init(a) git__noop() #define git_mutex_init(a) git__noop_args(a)
#define git_mutex_lock(a) git__noop() #define git_mutex_lock(a) git__noop_args(a)
#define git_mutex_unlock(a) git__noop() #define git_mutex_unlock(a) git__noop_args(a)
#define git_mutex_free(a) git__noop() #define git_mutex_free(a) git__noop_args(a)
/* Pthreads condition vars */ /* Pthreads condition vars */
#define git_cond unsigned int #define git_cond unsigned int
#define git_cond_init(c) git__noop() #define git_cond_init(c) git__noop_args(c)
#define git_cond_free(c) git__noop() #define git_cond_free(c) git__noop_args(c)
#define git_cond_wait(c, l) git__noop() #define git_cond_wait(c, l) git__noop_args(c, l)
#define git_cond_signal(c) git__noop() #define git_cond_signal(c) git__noop_args(c)
#define git_cond_broadcast(c) git__noop() #define git_cond_broadcast(c) git__noop_args(c)
/* Pthreads rwlock */ /* Pthreads rwlock */
#define git_rwlock unsigned int #define git_rwlock unsigned int
#define git_rwlock_init(a) git__noop() #define git_rwlock_init(a) git__noop_args(a)
#define git_rwlock_rdlock(a) git__noop() #define git_rwlock_rdlock(a) git__noop_args(a)
#define git_rwlock_rdunlock(a) git__noop() #define git_rwlock_rdunlock(a) git__noop_args(a)
#define git_rwlock_wrlock(a) git__noop() #define git_rwlock_wrlock(a) git__noop_args(a)
#define git_rwlock_wrunlock(a) git__noop() #define git_rwlock_wrunlock(a) git__noop_args(a)
#define git_rwlock_free(a) git__noop() #define git_rwlock_free(a) git__noop_args(a)
#define GIT_RWLOCK_STATIC_INIT 0 #define GIT_RWLOCK_STATIC_INIT 0
......
...@@ -381,6 +381,7 @@ extern int git__getenv(git_str *out, const char *name); ...@@ -381,6 +381,7 @@ extern int git__getenv(git_str *out, const char *name);
extern int git__online_cpus(void); extern int git__online_cpus(void);
GIT_INLINE(int) git__noop(void) { return 0; } GIT_INLINE(int) git__noop(void) { return 0; }
GIT_INLINE(int) git__noop_args(void *a, ...) { GIT_UNUSED(a); return 0; }
#include "alloc.h" #include "alloc.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment