PulseAudio  16.0
gccmacro.h File Reference

GCC attribute macros. More...

Go to the source code of this file.

Macros

#define PA_GCC_PRINTF_ATTR(a, b)
 If we're in GNU C, use some magic for detecting invalid format strings. More...
 
#define PA_GCC_SENTINEL
 Macro for usage of GCC's sentinel compilation warnings. More...
 
#define PA_GCC_NORETURN
 Macro for no-return functions. More...
 
#define PA_GCC_UNUSED
 Macro for not used function, variable or parameter. More...
 
#define PA_GCC_DESTRUCTOR
 Call this function when process terminates. More...
 
#define PA_GCC_PURE
 This function's return value depends only the arguments list and global state. More...
 
#define PA_GCC_CONST
 This function's return value depends only the arguments list (stricter version of PA_GCC_PURE) More...
 
#define PA_GCC_DEPRECATED
 This function is deprecated. More...
 
#define PA_GCC_PACKED
 Structure shall be packed in memory. More...
 
#define PA_GCC_ALLOC_SIZE(x)
 Macro for usage of GCC's alloc_size attribute. More...
 
#define PA_GCC_ALLOC_SIZE2(x, y)
 Macro for usage of GCC's alloc_size attribute. More...
 
#define PA_GCC_MALLOC
 Macro for usage of GCC's malloc attribute. More...
 
#define PA_LIKELY(x)   (x)
 
#define PA_UNLIKELY(x)   (x)
 
#define PA_CLAMP(x, low, high)   (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
 
#define PA_CLAMP_UNLIKELY(x, low, high)   (PA_UNLIKELY((x) > (high)) ? (high) : (PA_UNLIKELY((x) < (low)) ? (low) : (x)))
 

Detailed Description

GCC attribute macros.

Macro Definition Documentation

◆ PA_CLAMP

#define PA_CLAMP (   x,
  low,
  high 
)    (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))

◆ PA_CLAMP_UNLIKELY

#define PA_CLAMP_UNLIKELY (   x,
  low,
  high 
)    (PA_UNLIKELY((x) > (high)) ? (high) : (PA_UNLIKELY((x) < (low)) ? (low) : (x)))

◆ PA_GCC_ALLOC_SIZE

#define PA_GCC_ALLOC_SIZE (   x)

Macro for usage of GCC's alloc_size attribute.

◆ PA_GCC_ALLOC_SIZE2

#define PA_GCC_ALLOC_SIZE2 (   x,
 
)

Macro for usage of GCC's alloc_size attribute.

◆ PA_GCC_CONST

#define PA_GCC_CONST

This function's return value depends only the arguments list (stricter version of PA_GCC_PURE)

◆ PA_GCC_DEPRECATED

#define PA_GCC_DEPRECATED

This function is deprecated.

◆ PA_GCC_DESTRUCTOR

#define PA_GCC_DESTRUCTOR

Call this function when process terminates.

◆ PA_GCC_MALLOC

#define PA_GCC_MALLOC

Macro for usage of GCC's malloc attribute.

◆ PA_GCC_NORETURN

#define PA_GCC_NORETURN

Macro for no-return functions.

◆ PA_GCC_PACKED

#define PA_GCC_PACKED

Structure shall be packed in memory.

◆ PA_GCC_PRINTF_ATTR

#define PA_GCC_PRINTF_ATTR (   a,
 
)

If we're in GNU C, use some magic for detecting invalid format strings.

◆ PA_GCC_PURE

#define PA_GCC_PURE

This function's return value depends only the arguments list and global state.

◆ PA_GCC_SENTINEL

#define PA_GCC_SENTINEL

Macro for usage of GCC's sentinel compilation warnings.

◆ PA_GCC_UNUSED

#define PA_GCC_UNUSED

Macro for not used function, variable or parameter.

◆ PA_LIKELY

#define PA_LIKELY (   x)    (x)

◆ PA_UNLIKELY

#define PA_UNLIKELY (   x)    (x)