Changeset e1868fb for lib/libtrace.h.in


Ignore:
Timestamp:
12/31/06 17:41:10 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
4746c71
Parents:
e2d49d5
Message:

Add attribute((format(printf))) flags to functions that should have it.
Found a nasty bug in trace_get_server_port() where the body of an if() wasn't
correctly {}'d.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r4bd8a5b re1868fb  
    140140#  define UNUSED __attribute__((unused))
    141141#  define PACKED __attribute__((packed))
     142#  define PRINTF(formatpos,argpos) __attribute__((format(printf,formatpos,argpos)))
    142143#else
    143144#  define SIMPLE_FUNCTION
    144145#  define UNUSED
    145146#  define PACKED
     147#  define PRINTF(formatpos,argpos)
    146148#endif
    147149       
     
    787789 * This function does clear the error status.
    788790 */
    789 DLLEXPORT void trace_perror(libtrace_t *trace, const char *msg,...);
     791DLLEXPORT void trace_perror(libtrace_t *trace, const char *msg,...) PRINTF(2,3);
    790792
    791793/** Check (and clear) the current error state of an output trace
     
    808810 * This function does clear the error status.
    809811 */
    810 DLLEXPORT void trace_perror_output(libtrace_out_t *trace, const char *msg,...);
     812DLLEXPORT void trace_perror_output(libtrace_out_t *trace, const char *msg,...)
     813        PRINTF(2,3);
    811814
    812815
Note: See TracChangeset for help on using the changeset viewer.