On 19/12/12 12:45, Pavel Březina wrote:
On 12/19/2012 10:27 AM, Ondrej Kos wrote:
i noticed warning during compilation:
src/providers/ldap/sdap_sudo.c: In function 'sdap_sudo_schedule_refresh':
src/providers/ldap/sdap_sudo.c:1236:9: warning: 'send_fn' may be used
uninitialized in this function [-Wmaybe-uninitialized]
patch is attached
Ondra
Hi,
thanks. FYI you need at least -O1.
I see also:
src/providers/ldap/sdap_async_sudo.c: In function
'sdap_sudo_load_sudoers_done':
src/providers/ldap/sdap_async_sudo.c:579:9: warning: 'ret' may be used
uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/sdap_async_sudo.c:543:13: note: 'ret' was declared here
Can you fix it too in this patch?
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
thanks, i forgot to raise optimalization level after some debugging
new patch is attached
Ondra
--
Ondrej Kos
Associate Software Engineer
Identity Management
Red Hat Czech
phone: +420-532-294-558
cell: +420-736-417-909
ext: 82-62558
loc: 1013 Brno 1 office
irc: okos @ #brno
From 27765194fca803daf77fbbd562a6928762374fed Mon Sep 17 00:00:00 2001
From: Ondrej Kos <[email protected]>
Date: Wed, 19 Dec 2012 10:25:39 +0100
Subject: [PATCH] LDAP: fix variables initialization
---
src/providers/ldap/sdap_async_sudo.c | 2 +-
src/providers/ldap/sdap_sudo.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
index 86edcc343857d6eb5adf49f565239d63a62cc6fa..e0d6d6701277676596ad566cf02fc71ab5416996 100644
--- a/src/providers/ldap/sdap_async_sudo.c
+++ b/src/providers/ldap/sdap_async_sudo.c
@@ -540,7 +540,7 @@ static int sdap_sudo_purge_sudoers(struct sysdb_ctx *sysdb_ctx,
{
const char *name;
int i;
- errno_t ret;
+ errno_t ret = EOK;
if (filter == NULL) {
/* removes downloaded rules from the cache */
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 53aa6d4a047a2e288eb2384893b2e8c81b94ea08..7bd71f5f3fe1b13235d7c34c8678462589b38c8c 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -1211,7 +1211,7 @@ static int sdap_sudo_schedule_refresh(TALLOC_CTX *mem_ctx,
struct tevent_req **_req)
{
struct tevent_req *req = NULL;
- sdap_sudo_timer_fn_t send_fn;
+ sdap_sudo_timer_fn_t send_fn = NULL;
const char *name = NULL;
struct timeval when;
--
1.7.11.7
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel