Commit 33ca3565988dd12ba35bdf222714a8c128b50d3f

Carlos Martín Nieto 2014-10-10T17:52:31

Merge pull request #2556 from sbc100/fix_warnings Fix warnings in thread-utils.h when building without -DTHREADSAFE=ON

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/thread-utils.h b/src/thread-utils.h
index 5511a51..8deedce 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