Browse Source

lavu/attributes: introduce AV_NOWARN_DEPRECATED.

tags/n0.9
Nicolas George 14 years ago
parent
commit
fb1c30b71a
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      libavutil/attributes.h

+ 18
- 0
libavutil/attributes.h View File

@@ -88,6 +88,24 @@
#endif
#endif

/**
* Disable warnings about deprecated features
* This is useful for sections of code kept for backward compatibility and
* scheduled for removal.
*/
#ifndef AV_NOWARN_DEPRECATED
#if AV_GCC_VERSION_AT_LEAST(4,6)
# define AV_NOWARN_DEPRECATED(code) \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
code \
_Pragma("GCC diagnostic pop")
#else
# define AV_NOWARN_DEPRECATED(code) code
#endif
#endif


#ifndef av_unused
#if defined(__GNUC__)
# define av_unused __attribute__((unused))


Loading…
Cancel
Save