Commit 041ef8d5 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(log): Tell GCC that an argument is a printf-style

	format string if HAVE_ATTRIBUTE_FORMAT_PRINTF is set.
(logv): Likewise.
parent fef294f9
/* /*
* $Id: log.h,v 0.9 1995/01/01 20:17:22 ceder Exp $ * $Id: log.h,v 0.10 1996/07/28 23:31:26 ceder Exp $
* Copyright (C) 1991, 1993, 1994, 1995 Lysator Academic Computer Association. * Copyright (C) 1991, 1993, 1994, 1995 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se. * Please mail bug reports to bug-lyskom@lysator.liu.se.
*/ */
/* /*
* $Id: log.h,v 0.9 1995/01/01 20:17:22 ceder Exp $ * $Id: log.h,v 0.10 1996/07/28 23:31:26 ceder Exp $
* *
* log.h * log.h
* *
...@@ -39,10 +39,18 @@ ...@@ -39,10 +39,18 @@
#if defined(HAVE_VFPRINTF) && defined(HAVE_STDARG_H) #if defined(HAVE_VFPRINTF) && defined(HAVE_STDARG_H)
extern void extern void
log (const char * format, ...); log (const char * format, ...)
# if HAVE_ATTRIBUTE_FORMAT_PRINTF
__attribute__ ((format (printf, 1, 2)))
# endif
;
extern void extern void
logv (const char * format, va_list AP); logv (const char * format, va_list AP)
# if HAVE_ATTRIBUTE_FORMAT_PRINTF
__attribute__ ((format (printf, 1, 0)))
# endif
;
#else /* !HAVE_VFPRINTF || !HAVE_STDARG_H*/ #else /* !HAVE_VFPRINTF || !HAVE_STDARG_H*/
extern void extern void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment