Changeset 4479497


Ignore:
Timestamp:
Mar 24, 2011, 12:46:25 AM (14 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
42ee1be
Parents:
82b734a
git-author:
David Benjamin <davidben@MIT.EDU> (02/26/11 00:52:13)
git-committer:
Anders Kaseorg <andersk@mit.edu> (03/24/11 00:46:25)
Message:
Use G_GNUC_PRINTF to get type-checking on our format strings

The extra type-checking is nice.

[andersk@mit.edu: Move G_GNUC_PRINTF such that no further preprocessor
 magic is needed]
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r2cbe7c3 r4479497  
    131131AX_C_CHECK_FLAG([-Wstrict-prototypes],[],[],[AM_CFLAGS="$AM_CFLAGS -Wstrict-prototypes"])
    132132
     133dnl Shut gcc up about zero-length format strings; the warning's apparently for
     134dnl efficiency reasons, which is bogus for custom functions.
     135AX_C_CHECK_FLAG([-Wno-format-zero-length],[],[],[AM_CFLAGS="$AM_CFLAGS -Wno-format-zero-length"])
     136
    133137m4_foreach([myflag],
    134138  [[-Wno-pointer-sign],[-Wno-empty-body],[-Wno-unused-value]],
  • fmtext.c

    rcb6c9e1 r4479497  
    5656
    5757/* Append normal, uncolored text specified by format string to 'f' */
    58 void owl_fmtext_appendf_normal(owl_fmtext *f, const char *fmt, ...)
     58void G_GNUC_PRINTF(2, 3) owl_fmtext_appendf_normal(owl_fmtext *f, const char *fmt, ...)
    5959{
    6060  va_list ap;
  • functions.c

    r82b734a r4479497  
    12021202}
    12031203
    1204 void owl_function_debugmsg(const char *fmt, ...)
     1204void G_GNUC_PRINTF(1, 2) owl_function_debugmsg(const char *fmt, ...)
    12051205{
    12061206  FILE *file;
     
    33463346}
    33473347
    3348 void owl_function_error(const char *fmt, ...)
     3348void G_GNUC_PRINTF(1, 2) owl_function_error(const char *fmt, ...)
    33493349{
    33503350  static int in_error = 0;
     
    34143414}
    34153415
    3416 void owl_function_makemsg(const char *fmt, ...)
     3416void G_GNUC_PRINTF(1, 2) owl_function_makemsg(const char *fmt, ...)
    34173417{
    34183418  va_list ap;
Note: See TracChangeset for help on using the changeset viewer.