chiark / gitweb /
Add printf attributes in exported headers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 26 Apr 2013 01:31:05 +0000 (21:31 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 26 Apr 2013 01:50:48 +0000 (21:50 -0400)
commite4d2bfdd73648f4b2bce123b6425d3e63bb99f33
tree3a759bff13db387188c50e4d66114034b2aae336
parentb1e2b33c5258f1cefcee55116ac5d049478c804d
Add printf attributes in exported headers

gcc (and other compilers) sometimes generate spurious warnings, and
thus users of public headers must be able to disable warnings.

Printf format attributes can be disabled by setting
    #define _sd_printf_attr_
before including the header file.

Also, add similar logic for sentinel attribute:
    #define _sd_sentinel_attr_
before including the header file disables the attribute.
src/systemd/sd-bus.h
src/systemd/sd-daemon.h
src/systemd/sd-journal.h
src/udev/udev.h