From 878da132fb95a15d3d4e67800df350cf6384c9cc Mon Sep 17 00:00:00 2001 From: rascal-hats Date: Wed, 16 Dec 2015 13:22:45 -0600 Subject: [PATCH] Update ngx_http_auth_ldap_module.c Initialize count on line 806. Prevents compilation errors. ``` nginx-auth-ldap/ngx_http_auth_ldap_module.c:815:26: error: variable 'count' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] cache->num_buckets = count; ^~~~~ nginx-auth-ldap/ngx_http_auth_ldap_module.c:793:27: note: initialize the variable 'count' to silence this warning ngx_uint_t want, count, i; ^ = 0 ``` --- ngx_http_auth_ldap_module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c index 4ca1d1e..39530de 100644 --- a/ngx_http_auth_ldap_module.c +++ b/ngx_http_auth_ldap_module.c @@ -803,6 +803,7 @@ ngx_http_auth_ldap_init_cache(ngx_cycle_t *cycle) } want = (conf->cache_size + 7) / 8; + count = 0; for (i = 0; i < sizeof(primes)/sizeof(primes[0]); i++) { count = primes[i]; if (count >= want) {