Index: generic/nsf.h =================================================================== diff -u -r92ab630ebd3c1b907e3d0fdf97cc07914245c028 -rc24b68646f2b5bc897704b212a10fdd35fa5c33a --- generic/nsf.h (.../nsf.h) (revision 92ab630ebd3c1b907e3d0fdf97cc07914245c028) +++ generic/nsf.h (.../nsf.h) (revision c24b68646f2b5bc897704b212a10fdd35fa5c33a) @@ -351,12 +351,20 @@ #else # define __GNUC_PREREQ(maj, min) (0) #endif + #if __GNUC_PREREQ(3, 3) # define NSF_nonnull(ARGS) __attribute__((__nonnull__(ARGS))) #else # define NSF_nonnull(ARGS) #endif +/* unforunately, we can't combine NSF_attribute_format() with functions called via stubs */ +#if __GNUC_PREREQ(3, 4) +# define NSF_attribute_format(ARGS) __attribute__((format ARGS)) +#else +# define NSF_attribute_format(ARGS) +#endif + EXTERN int Nsf_ArgumentParse(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Nsf_Object *object, Tcl_Obj *procNameObj, @@ -402,7 +410,7 @@ EXTERN void NsfLog(Tcl_Interp *interp, int requiredLevel, CONST char *fmt, ...) - NSF_nonnull(1) NSF_nonnull(3); + NSF_nonnull(1) NSF_nonnull(3) NSF_attribute_format((printf,3,4)); /* * Nsf Pointer converter interface