[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH 0209] Silence GCC warnings produced by -Wjump-misses-init



Hello,

Silence GCC warnings produced by -Wjump-misses-init.

It seems that it is false alarm in our case.

This patch should go to branches v3 and master.

--
Petr^2 Spacek

From ba457ca6c37b40d59194ea723285ec4b2a7645b0 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspacek redhat com>
Date: Fri, 6 Dec 2013 14:40:55 +0100
Subject: [PATCH] Silence GCC warnings produced by -Wjump-misses-init.

It seems that it is false alarm in our case.

Signed-off-by: Petr Spacek <pspacek redhat com>
---
 src/acl.c         | 3 ++-
 src/ldap_helper.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/acl.c b/src/acl.c
index 7235512b5b8ea8448ca569b9a075568e8484caf9..1e32f91255e61f1b5ad9364617664f35bf8d56e4 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -613,6 +613,7 @@ acl_parse_forwarder(const char *forwarder_str, isc_mem_t *mctx, isc_sockaddr_t *
 	ld_string_t *new_forwarder_str = NULL;
 	const cfg_obj_t *faddresses;
 	const cfg_listelt_t *element;
+	const cfg_obj_t *forwarder;
 
 	in_port_t port = 53;
 
@@ -635,7 +636,7 @@ acl_parse_forwarder(const char *forwarder_str, isc_mem_t *mctx, isc_sockaddr_t *
 		goto cleanup;
 	}
 
-	const cfg_obj_t *forwarder = cfg_listelt_value(element);
+	forwarder = cfg_listelt_value(element);
 	CHECKED_MEM_GET_PTR(mctx, *sa);
 	**sa = *cfg_obj_assockaddr(forwarder);
 	if (isc_sockaddr_getport(*sa) == 0)
diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 5c54f4a29e418d3dc348ca7ec9811078c29832c2..c9da18d75a77fa549ff5e337d1fb89d204e4399e 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -2758,6 +2758,7 @@ ldap_find_ptr(ldap_instance_t *ldap_inst, const int af, const char *ip_str,
 	      dns_name_t *ptr_name, ld_string_t *ptr_dn,
 	      dns_name_t *zone_name) {
 	isc_result_t result;
+	const char *owner_zone_dn_ptr;
 	isc_mem_t *mctx = ldap_inst->mctx;
 
 	union {
@@ -2806,7 +2807,7 @@ ldap_find_ptr(ldap_instance_t *ldap_inst, const int af, const char *ip_str,
 	 * owner_dn_ptr = "idnsName=100.0.168, idnsname=192.in-addr.arpa,cn=dns,$SUFFIX"
 	 * owner_zone_dn_ptr = "idnsname=192.in-addr.arpa,cn=dns,$SUFFIX"
 	 */
-	char *owner_zone_dn_ptr = strstr(str_buf(ptr_dn),", ") + 1;
+	owner_zone_dn_ptr = strstr(str_buf(ptr_dn),", ") + 1;
 
 	/* Get attribute "idnsAllowDynUpdate" for reverse zone or use default. */
 	CHECK(dn_to_dnsname(mctx, owner_zone_dn_ptr, zone_name, NULL));
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]