summaryrefslogtreecommitdiff
path: root/libavutil/thread.h
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2017-03-31 19:04:56 +0200
committerDiego Biurrun <diego@biurrun.de>2017-04-12 10:07:09 +0200
commit193b09189004ede4a6998e69192d1a9f63602088 (patch)
tree5f86061029eaba481ffb7a59656d8662b9300d2e /libavutil/thread.h
parentb200a2c8da403b5a5c8b50f8cb4a75fd4f0131b1 (diff)
thread: Define ff_mutex_* macros as stub functions when threads are disabled
Silences a bunch of "statement with no effect" warnings with threads disabled.
Diffstat (limited to 'libavutil/thread.h')
-rw-r--r--libavutil/thread.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/thread.h b/libavutil/thread.h
index cf0fbdda5f..ac76bb88e2 100644
--- a/libavutil/thread.h
+++ b/libavutil/thread.h
@@ -48,10 +48,10 @@
#define AVMutex char
-#define ff_mutex_init(mutex, attr) (0)
-#define ff_mutex_lock(mutex) (0)
-#define ff_mutex_unlock(mutex) (0)
-#define ff_mutex_destroy(mutex) (0)
+static inline int ff_mutex_init(AVMutex *mutex, const void *attr){ return 0; }
+static inline int ff_mutex_lock(AVMutex *mutex){ return 0; }
+static inline int ff_mutex_unlock(AVMutex *mutex){ return 0; }
+static inline int ff_mutex_destroy(AVMutex *mutex){ return 0; }
#define AVOnce char
#define AV_ONCE_INIT 0