[Freeipa-devel] [PATCH] ipa_pwd_extop: Fix warning declaration shadows previous
Lukas Slebodnik
lslebodn at redhat.com
Fri Aug 5 12:16:52 UTC 2016
ehlo,
attached patches fixes few compiler warnings in ipa-extop.
Sorry for not following naming convention for patches.
But I do not remeber my numer and you will use github/pagure
anyway.
LS
-------------- next part --------------
>From 8a3e8c5e35749f82336e6375e91d7203b1072714 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Fri, 5 Aug 2016 12:00:55 +0000
Subject: [PATCH 1/4] ipa_pwd_extop: Fix warning declaration shadows previous
local
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
ipa_pwd_extop.c:397:19: warning: declaration of ‘target_sdn’
shadows a previous local [-Wshadow]
Slapi_DN *target_sdn;
^~~~~~~~~~
ipa_pwd_extop.c:212:16: note: shadowed declaration is here
Slapi_DN *target_sdn = NULL;
^~~~~~~~~~
---
daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
index 3c2c44f6198bf74615fff1ae231a48bed77526ee..74ddfdf87ab19f9fe65b488f78c3b4217544ab2f 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
@@ -394,7 +394,6 @@ parse_req_done:
if (dn) {
Slapi_DN *bind_sdn;
- Slapi_DN *target_sdn;
/* if the user changing the password is self, we must request the
* old password and verify it matches the current one before
--
2.7.4
-------------- next part --------------
>From 09d32bb149d52d79e4b4cb58fdc3d49bdda81115 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Fri, 5 Aug 2016 12:03:07 +0000
Subject: [PATCH 2/4] =?UTF-8?q?ipa-pwd-extop:=20Fix=20warning=20assignment?=
=?UTF-8?q?=20discards=20=E2=80=98const=E2=80=99=20qualifier=20from=20poin?=
=?UTF-8?q?ter?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
ipa_pwd_extop.c: In function ‘ipapwd_chpwop’:
ipa_pwd_extop.c:337:13: warning: assignment discards ‘const’ qualifier
from pointer target type [-Wdiscarded-qualifiers]
target_dn = slapi_sdn_get_ndn(target_sdn);
^
---
daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
index 74ddfdf87ab19f9fe65b488f78c3b4217544ab2f..6a87a2786c3fb762e07e40509c663a84134978a5 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c
@@ -210,7 +210,7 @@ static int ipapwd_chpwop(Slapi_PBlock *pb, struct ipapwd_krbcfg *krbcfg)
char *principal = NULL;
Slapi_PBlock *chpwop_pb = NULL;
Slapi_DN *target_sdn = NULL;
- char *target_dn = NULL;
+ const char *target_dn = NULL;
/* Get the ber value of the extended operation */
slapi_pblock_get(pb, SLAPI_EXT_OP_REQ_VALUE, &extop_value);
--
2.7.4
More information about the Freeipa-devel
mailing list