FFmpeg
Macros
attributes.h File Reference

Platform and compiler attribute macros. More...

#include <stddef.h>

Go to the source code of this file.

Macros

#define CHECKASM_PRINTF(fmt, attr)   __attribute__((__format__(__printf__, fmt, attr)))
 Printf-style format string checking attribute. More...
 
#define CHECKASM_API
 Symbol visibility attribute for public API functions. More...
 

Detailed Description

Platform and compiler attribute macros.

This header defines platform-specific compiler attributes used throughout the checkasm API for features like printf format checking and symbol visibility.

Definition in file attributes.h.

Macro Definition Documentation

◆ CHECKASM_PRINTF

#define CHECKASM_PRINTF (   fmt,
  attr 
)    __attribute__((__format__(__printf__, fmt, attr)))

Printf-style format string checking attribute.

Enables compile-time checking of printf-style format strings and arguments when supported by the compiler. This helps catch format string errors at compile time rather than runtime.

Parameters
fmtPosition of the format string parameter (1-indexed)
attrPosition of the first variadic argument (1-indexed)

Definition at line 59 of file attributes.h.

◆ CHECKASM_API

#define CHECKASM_API

Symbol visibility attribute for public API functions.

Marks functions and variables as part of the public checkasm API. This ensures proper symbol export/import behavior across different platforms and build configurations.

Note
All public checkasm API functions are marked with this attribute.

Definition at line 90 of file attributes.h.