[SCM] Samba Shared Repository - branch master updated - afd405dd90561b6aa99b4c9e5b62644659b96768

Tim Prouty tprouty at samba.org
Mon Jan 19 17:19:05 GMT 2009


On Jan 18, 2009, at 10:09 PM, Stefan Metzmacher wrote:

> The branch, master has been updated
>       via  bae593bb118459c1b0d12d02e58ba6c89400aa97 (commit)
>       from  d6e801b7d9a666d40f109df20dff0faaa2b46e70 (commit)
>
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
>
>
> commit bae593bb118459c1b0d12d02e58ba6c89400aa97
> Author: Stefan Metzmacher <metze at samba.org>
> Date:   Sat Jan 17 18:13:31 2009 +0100
>
>    ndr_print: fix the output ndr debug messages only add header line  
> once
>
>    metze
>    (from samba4wins tree e99531aae325e4443fcb917a75dfe4a86b892583)

Is it necessary to add these zero length DEBUGs?  Could they be  
replaced with something else to achieve the same effect (I'm not sure  
what a zero-length DEBUG actually does)?  They produce the following  
warning:

Compiling ../librpc/ndr/ndr.c
../librpc/ndr/ndr.c: In function ‘ndr_print_debug’:
../librpc/ndr/ndr.c:214: warning: zero-length printf format string
../librpc/ndr/ndr.c: In function ‘ndr_print_union_debug’:
../librpc/ndr/ndr.c:232: warning: zero-length printf format string
../librpc/ndr/ndr.c: In function ‘ndr_print_function_debug’:
../librpc/ndr/ndr.c:251: warning: zero-length printf format string

> -----------------------------------------------------------------------
>
> diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
> index c382abb..9f7aab3 100644
> --- a/librpc/ndr/ndr.c
> +++ b/librpc/ndr/ndr.c
> @@ -211,6 +211,8 @@ _PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn,  
> const char *name, void *ptr)
> {
> 	struct ndr_print *ndr;
>
> +	DEBUG(0,(""));
> +
> 	ndr = talloc_zero(NULL, struct ndr_print);
> 	if (!ndr) return;
> 	ndr->print = ndr_print_debug_helper;
> @@ -227,6 +229,8 @@ _PUBLIC_ void  
> ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_
> {
> 	struct ndr_print *ndr;
>
> +	DEBUG(0,(""));
> +
> 	ndr = talloc_zero(NULL, struct ndr_print);
> 	if (!ndr) return;
> 	ndr->print = ndr_print_debug_helper;
> @@ -244,6 +248,8 @@ _PUBLIC_ void  
> ndr_print_function_debug(ndr_print_function_t fn, const char *name
> {
> 	struct ndr_print *ndr;
>
> +	DEBUG(0,(""));
> +
> 	ndr = talloc_zero(NULL, struct ndr_print);
> 	if (!ndr) return;
> 	ndr->print = ndr_print_debug_helper;


More information about the samba-technical mailing list