diff options
author | James Peach <jpeach@samba.org> | 2005-08-26 03:23:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:03:23 -0500 |
commit | 52188859e77d431302377849c8e26b0b46bba73f (patch) | |
tree | 97023792bdda5b502d46780b901f61c18451b46c /source3/include/includes.h | |
parent | 56fd626fe710f24201b1f413f8b7b28a919df0c4 (diff) | |
download | samba-52188859e77d431302377849c8e26b0b46bba73f.tar.gz samba-52188859e77d431302377849c8e26b0b46bba73f.tar.bz2 samba-52188859e77d431302377849c8e26b0b46bba73f.zip |
r9627: Enable format string checking for the MIPSPro compilers.
(This used to be commit 5396944fc3799a9746d00167a6f0e8465df4dcea)
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r-- | source3/include/includes.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index c9208d2b25..51aa218ac6 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -1323,13 +1323,18 @@ extern int DEBUGLEVEL; #endif /* add varargs prototypes with printf checking */ +/*PRINTFLIKE2 */ int fdprintf(int , const char *, ...) PRINTF_ATTRIBUTE(2,3); +/*PRINTFLIKE1 */ int d_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2); +/*PRINTFLIKE2 */ int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3); #ifndef HAVE_SNPRINTF_DECL +/*PRINTFLIKE3 */ int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); #endif #ifndef HAVE_ASPRINTF_DECL +/*PRINTFLIKE2 */ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif @@ -1340,11 +1345,19 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF) #define snprintf smb_snprintf #define vsnprintf smb_vsnprintf + +/* PRINTFLIKE3 */ +int smb_snprintf(char *str,size_t count,const char *fmt,...); +int smb_vsnprintf (char *str, size_t count, const char *fmt, va_list args); + #endif +/* PRINTFLIKE2 */ void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3); +/* PRINTFLIKE2 */ int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); +/* PRINTFLIKE2 */ int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); int d_vfprintf(FILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); @@ -1356,7 +1369,6 @@ int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE( #define slprintf snprintf #define vslprintf vsnprintf - /* we need to use __va_copy() on some platforms */ #ifdef HAVE_VA_COPY #define VA_COPY(dest, src) va_copy(dest, src) |