diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2007-06-29 01:01:24 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2007-06-29 01:01:24 +0000 |
| commit | f8369e867bcb6ff44d2ee12fc79070b869d41abd (patch) | |
| tree | 93742abe35959d7f3897d6f3b43ca37921d59a82 /src/util | |
| parent | 0708ecde434afdabb8412d6af61a0c717af56abb (diff) | |
| download | krb5-f8369e867bcb6ff44d2ee12fc79070b869d41abd.tar.gz krb5-f8369e867bcb6ff44d2ee12fc79070b869d41abd.tar.xz krb5-f8369e867bcb6ff44d2ee12fc79070b869d41abd.zip | |
Attach format attributes to declarations of various message-formatting
routines under gcc. In a couple of routines, hard-code the preference
for using the vsnprintf paths instead of list-of-int-arguments hacks
now that we're assuming vsnprintf is available in other places.
Installed headers affected:
com_err.h (com_err, com_err_va)
ss.h (ss_error)
krb5.h (krb5_set_error_message, krb5_vset_error_message)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19653 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/et/com_err.h | 12 | ||||
| -rw-r--r-- | src/util/ss/ss.h | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/util/et/com_err.h b/src/util/et/com_err.h index 042a9bd45..58c43d31d 100644 --- a/src/util/et/com_err.h +++ b/src/util/et/com_err.h @@ -39,10 +39,18 @@ extern "C" { /* Public interfaces */ extern void KRB5_CALLCONV_C com_err - (const char *, errcode_t, const char *, ...); + (const char *, errcode_t, const char *, ...) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 3, 4))) +#endif + ; extern void KRB5_CALLCONV com_err_va (const char *whoami, errcode_t code, const char *fmt, - va_list ap); + va_list ap) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 3, 0))) +#endif + ; extern /*@observer@*//*@dependent@*/ const char * KRB5_CALLCONV error_message (errcode_t) /*@modifies internalState@*/; diff --git a/src/util/ss/ss.h b/src/util/ss/ss.h index 45ba4061b..ac25266d3 100644 --- a/src/util/ss/ss.h +++ b/src/util/ss/ss.h @@ -49,7 +49,11 @@ void ss_list_requests __SS_PROTO; void ss_quit __SS_PROTO; char *ss_current_request(); char *ss_name(int); -void ss_error (int, long, char const *, ...); +void ss_error (int, long, char const *, ...) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 3, 4))) +#endif + ; void ss_perror (int, long, char const *); int ss_listen (int); int ss_create_invocation(char *, char *, char *, ss_request_table *, int *); |
