diff --git a/src/butc/error_macros.h b/src/butc/error_macros.h index 5f6c760caf..132afa1936 100644 --- a/src/butc/error_macros.h +++ b/src/butc/error_macros.h @@ -26,11 +26,15 @@ } extern void ErrorLog(int debug, afs_int32 task, afs_int32 error1, - afs_int32 error2, char *fmt, ...); -extern void TapeLog(int debug, afs_int32 task, afs_int32 error1, - afs_int32 error2, char *fmt, ...); -extern void TLog(afs_int32 task, char *fmt, ...); + afs_int32 error2, char *fmt, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 5, 6); +extern void TapeLog(int debug, afs_int32 task, afs_int32 error1, + afs_int32 error2, char *fmt, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 5, 6); + +extern void TLog(afs_int32 task, char *fmt, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 2, 3); extern void FreeNode(afs_int32 taskID); extern void CreateNode(struct dumpNode **newNode); diff --git a/src/butc/lwps.c b/src/butc/lwps.c index 3f4017ffc1..0f1daf6d4c 100644 --- a/src/butc/lwps.c +++ b/src/butc/lwps.c @@ -299,7 +299,7 @@ ELog(afs_int32 task, char *fmt, ...) va_end(ap); /* Sends message to ErrorLog, TapeLog and stdout */ - ErrorLog(0, task, 0, 0, tmp); + ErrorLog(0, task, 0, 0, "%s", tmp); } /* first proc called by anybody who intends to use the device */ diff --git a/src/kauth/kaserver.h b/src/kauth/kaserver.h index f4c8037562..ce77443231 100644 --- a/src/kauth/kaserver.h +++ b/src/kauth/kaserver.h @@ -167,5 +167,7 @@ extern int kaux_islocked(afs_int32 to, u_int attempts, u_int locktime); extern afs_int32 krb4_cross; -extern afs_int32 es_Report(char *fmt, ...); +extern afs_int32 es_Report(char *fmt, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); + #define LOCKPW diff --git a/src/lwp/test/seltest.h b/src/lwp/test/seltest.h index 09d538fa52..f29c3e55db 100644 --- a/src/lwp/test/seltest.h +++ b/src/lwp/test/seltest.h @@ -35,7 +35,10 @@ typedef struct { void OpenFDs(int); void assertNullFDSet(int fd, fd_set *); void Die(int flag, char *); -void Log(char *fmt, ...); + +void Log(char *fmt, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); + void sendOOB(int); void recvOOB(int); diff --git a/src/sys/sys_prototypes.h b/src/sys/sys_prototypes.h index 8ce924562a..5ddcc476bd 100644 --- a/src/sys/sys_prototypes.h +++ b/src/sys/sys_prototypes.h @@ -36,7 +36,9 @@ extern void inparam_conversion(afs_int32, char *, afs_int32); extern void outparam_conversion(afs_int32, char *, afs_int32); /* rmtsyss.c */ -extern void rmt_Quit(char *msg, ...); +extern void rmt_Quit(char *msg, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); + extern void rmtsysd(void); /* setpag.c */ diff --git a/src/ubik/ubik.p.h b/src/ubik/ubik.p.h index 315a80f461..adcbdac865 100644 --- a/src/ubik/ubik.p.h +++ b/src/ubik/ubik.p.h @@ -395,7 +395,8 @@ extern afs_int32 ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans, ubik_version *OldVersion, ubik_version *NewVersion); -extern void panic(char *format, ...); +extern void panic(char *format, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); extern afs_uint32 ubikGetPrimaryInterfaceAddr(afs_uint32 addr); /*\}*/ @@ -437,10 +438,17 @@ extern void ulock_Debug(struct ubik_debug *aparm); extern int uvote_ShouldIRun(void); extern afs_int32 uvote_GetSyncSite(void); extern int uvote_Init(void); -extern void ubik_vprint(const char *format, va_list ap); -extern void ubik_print(const char *format, ...); -extern void ubik_dprint(const char *format, ...); -extern void ubik_dprint_25(const char *format, ...); +extern void ubik_vprint(const char *format, va_list ap) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 0); + +extern void ubik_print(const char *format, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); + +extern void ubik_dprint(const char *format, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); + +extern void ubik_dprint_25(const char *format, ...) + AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); /*\}*/ #endif /* UBIK_INTERNALS */