[vlc-devel] [PATCH 6/6] vlc_threads: use VLC_ATTR to apply attributes

Filip Roséen filip at atch.se
Sun Feb 26 20:13:16 CET 2017


---
 include/vlc_threads.h | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 1ee346cc9e..2cba013b6b 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -28,6 +28,8 @@
 #ifndef VLC_THREADS_H_
 #define VLC_THREADS_H_
 
+#include "vlc_common.h"
+
 /**
  * \ingroup os
  * \defgroup thread Threads and synchronization primitives
@@ -832,9 +834,9 @@ VLC_API void msleep(mtime_t delay);
  */
 
 static
-__attribute__((unused))
-__attribute__((noinline))
-__attribute__((error("sorry, cannot sleep for such short a time")))
+VLC_ATTR(unused)
+VLC_ATTR(noinline)
+VLC_ATTR(error("sorry, cannot sleep for such short a time"))
 mtime_t impossible_delay( mtime_t delay )
 {
     (void) delay;
@@ -842,9 +844,9 @@ mtime_t impossible_delay( mtime_t delay )
 }
 
 static
-__attribute__((unused))
-__attribute__((noinline))
-__attribute__((warning("use proper event handling instead of short delay")))
+VLC_ATTR(unused)
+VLC_ATTR(noinline)
+VLC_ATTR(warning("use proper event handling instead of short delay"))
 mtime_t harmful_delay( mtime_t delay )
 {
     return delay;
@@ -860,9 +862,9 @@ mtime_t harmful_delay( mtime_t delay )
            : d))
 
 static
-__attribute__((unused))
-__attribute__((noinline))
-__attribute__((error("deadlines can not be constant")))
+VLC_ATTR(unused)
+VLC_ATTR(noinline)
+VLC_ATTR(error("deadlines cannot be constant"))
 mtime_t impossible_deadline( mtime_t deadline )
 {
     return deadline;
-- 
2.11.1



More information about the vlc-devel mailing list