summaryrefslogtreecommitdiff
path: root/src/thread-utils.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2014-09-08 16:45:57 -0700
committerSam Clegg <sbc@chromium.org>2014-09-08 16:48:04 -0700
commitccd8ba9bbaecb392a2587e2a046286af3f3cccef (patch)
tree88aa2c867c144a731d5bf5964e99d8b7ecff4b8d /src/thread-utils.h
parent1e71354e34f360b19285ca108cd07903122a0a62 (diff)
downloadlibgit2-ccd8ba9bbaecb392a2587e2a046286af3f3cccef.tar.gz
Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON
The compiler was generating a bunch of warnings for git_mutex_init and git_mutex_lock when GIT_THREADS was not defined (i.e. when not using -DTHREADSAFE=ON). Also remove an unused variable from tests/path/core.c.
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r--src/thread-utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h
index 5511a5117..8deedce81 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -183,8 +183,8 @@ GIT_INLINE(int64_t) git_atomic64_add(git_atomic64 *a, int64_t addend)
/* Pthreads Mutex */
#define git_mutex unsigned int
-#define git_mutex_init(a) 0
-#define git_mutex_lock(a) 0
+static int git_mutex_init(git_mutex* mutex) { GIT_UNUSED(mutex); return 0; }
+static int git_mutex_lock(git_mutex* mutex) { GIT_UNUSED(mutex); return 0; }
#define git_mutex_unlock(a) (void)0
#define git_mutex_free(a) (void)0