[Freeipa-devel] [PATCH 0105] Remove dead assignment in ldap_parse_zoneentry()

Adam Tkac atkac at redhat.com
Thu Nov 22 13:33:13 UTC 2012


On Thu, Nov 22, 2012 at 12:30:00PM +0100, Petr Spacek wrote:
> Hello,
> 
> this patch fixes the last warning from Clang. Any new warning should
> attract our attention.
> 
> Commit message:
>     Remove dead assignment in ldap_parse_zoneentry().
> 
>     Assigned result value was never read because it is overwritten
>     by following CHECK()s in any case.
> 
>     Dead assignment was reported by Clang static code analysis.
> 
> -- 
> Petr^2 Spacek

Ack

> From 850efaf7a1fce473216d5c0e07d5738c9819b01d Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspacek at redhat.com>
> Date: Thu, 22 Nov 2012 12:23:15 +0100
> Subject: [PATCH] Remove dead assignment in ldap_parse_zoneentry().
> 
> Assigned result value was never read because it is overwritten
> by following CHECK()s in any case.
> 
> Dead assignment was reported by Clang static code analysis.
> 
> Signed-off-by: Petr Spacek <pspacek at redhat.com>
> ---
>  src/ldap_helper.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index e537d9b3b76c6a7144ee7df1ddda26ed95b4ab0d..57235de7da158b7a05de9e35fff2cdaaff74276c 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -1334,7 +1334,6 @@ ldap_parse_zoneentry(ldap_entry_t *entry, ldap_instance_t *inst)
>  		goto cleanup;
>  
>  	zone_dynamic = (result == DNS_R_DYNAMIC);
> -	result = ISC_R_SUCCESS;
>  
>  	/* initialize serial in zone register and always increment serial
>  	 * for a new zone (typically after BIND start)
> -- 
> 1.7.11.7
> 


-- 
Adam Tkac, Red Hat, Inc.




More information about the Freeipa-devel mailing list