Add printf format checks to the rest of tree

Add printf format checks to the remaining va-arg printf-style
functions in the tree. There are no error fixes required from this
change.

Change-Id: If774532a3ac5d8b611ec9f47576e933a57907185
Reviewed-on: http://gerrit.openafs.org/796
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Simon Wilkinson 2009-11-07 23:48:14 +00:00 committed by Derrick Brashear
parent a150df6107
commit 0b234aa57f
6 changed files with 32 additions and 13 deletions

View File

@ -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);

View File

@ -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 */

View File

@ -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

View File

@ -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);

View File

@ -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 */

View File

@ -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 */