>From b3fc90931ca25849d5be4865f8a2d686872872b0 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Thu, 2 Oct 2014 16:37:14 +0200 Subject: [PATCH] Suppress warning maybe-uninitialized There is a warning with some version of gcc (4.9.1, 4.4.7). In my opinion, variable "a" should be initialized every time if "maps" is not NULL. src/providers/ldap/sdap.c: In function 'sdap_parse_entry': src/providers/ldap/sdap.c:481:56: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized] for (ai = a; ai < attrs_num; ai++) { ^ src/providers/ldap/sdap.c:307:9: note: 'a' was declared here int a, i, ret, ai; ^ CCLD libsss_ldap_common.la --- src/providers/ldap/sdap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c index 7034b11ed8e3aabdcff94462079484dd3ca53ef9..1643a609013646a79ba5e5c96de7b573edf384fc 100644 --- a/src/providers/ldap/sdap.c +++ b/src/providers/ldap/sdap.c @@ -304,7 +304,8 @@ int sdap_parse_entry(TALLOC_CTX *memctx, struct ldb_val v; char *str; int lerrno; - int a, i, ret, ai; + int i, ret, ai; + volatile int a; const char *name; bool store; bool base64; -- 2.1.0