svn commit: samba r25830 - in branches/SAMBA_4_0/source/lib/util: .

Andrew Bartlett abartlet at samba.org
Mon Nov 5 10:27:15 GMT 2007


On Mon, 2007-11-05 at 10:10 +0000, metze at samba.org wrote:
> Author: metze
> Date: 2007-11-05 10:10:17 +0000 (Mon, 05 Nov 2007)
> New Revision: 25830
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25830
> 
> Log:
> fix compiler warning
> 
> metze
> Modified:
>    branches/SAMBA_4_0/source/lib/util/debug.c
>    branches/SAMBA_4_0/source/lib/util/debug.h
> 
> 
> Changeset:
> Modified: branches/SAMBA_4_0/source/lib/util/debug.c
> ===================================================================
> --- branches/SAMBA_4_0/source/lib/util/debug.c	2007-11-05 07:09:41 UTC (rev 25829)
> +++ branches/SAMBA_4_0/source/lib/util/debug.c	2007-11-05 10:10:17 UTC (rev 25830)
> @@ -102,7 +102,7 @@
>    @note You should never have to call this function directly. Call the DEBUG()
>    macro instead.
>  */
> -_PUBLIC_ void do_debug(const char *format, ...) _PRINTF_ATTRIBUTE(1,2)
> +_PUBLIC_ void do_debug(const char *format, ...)
>  {
>  	va_list ap;
>  	char *s = NULL;
> 
> Modified: branches/SAMBA_4_0/source/lib/util/debug.h
> ===================================================================
> --- branches/SAMBA_4_0/source/lib/util/debug.h	2007-11-05 07:09:41 UTC (rev 25829)
> +++ branches/SAMBA_4_0/source/lib/util/debug.h	2007-11-05 10:10:17 UTC (rev 25830)
> @@ -121,4 +121,4 @@
>    @note You should never have to call this function directly. Call the DEBUG()
>    macro instead.
>  */
> -_PUBLIC_ void do_debug(const char *format, ...) _PRINTF_ATTRIBUTE(1,2);
> +_PUBLIC_ void do_debug(const char *format, ...) PRINTF_ATTRIBUTE(1,2);

This is why I really prefer these prototypes to be autogenerated.  It
keeps everything in sync, including the documentation/annotations about
printf(), without having a manually remember if we need the .c or .h
version of that macro...

(For the benifit of the list: the tricky part here is that the actual
macro expansion into an attribute must only be done on prototypes, not
the actual funtion, hence the _PRINTF../PRINTF... variation). 

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20071105/c380e95b/attachment.bin


More information about the samba-technical mailing list