Function definition(?) without {} Function definition(?) without {} c c

Function definition(?) without {}


av_printf_format is a macro, which can optionally add a GCC attribute to the function declaration. It's defined in attributes.h:

#ifdef __GNUC__#    define av_builtin_constant_p __builtin_constant_p#    define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))#else#    define av_builtin_constant_p(x) 0#    define av_printf_format(fmtpos, attrpos)#endif

So this is actually a function declaration, which may have a specific attribute if compiled on GCC.

The format attribute tells GCC that the function takes its arguments like printf, which helps diagnose some errors.