blob: e33f46adc8732e7d7f48ecf7466be971beeae3bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef TINYALSA_ATTRIBUTES_H
#define TINYALSA_ATTRIBUTES_H
/** @defgroup libtinyalsa-attributes
* @brief GCC attributes to issue diagnostics
* when the library is being used incorrectly.
* */
#ifdef __GNUC__
/** Issues a warning when a function is being
* used that is now deprecated.
* @ingroup libtinyalsa-attributes
* */
#define TINYALSA_DEPRECATED __attribute__((deprecated))
/** Issues a warning when a return code of
* a function is not checked.
* @ingroup libtinyalsa-attributes
* */
#define TINYALSA_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else /* __GNUC__ */
/** This is just a placeholder for compilers
* that aren't GCC or Clang.
* @ingroup libtinyalsa-attributes
* */
#define TINYALSA_DEPRECATED
/** This is just a placeholder for compilers
* that aren't GCC or Clang.
* @ingroup libtinyalsa-attributes
* */
#define TINYALSA_WARN_UNUSED_RESULT
#endif /* __GNUC__ */
#endif /* TINYALSA_ATTRIBUTES_H */
|