diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2016-09-01 17:25:23 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-09-02 08:34:53 +0200 |
commit | 3f6aecfe5061e165c10829142854ec7189029407 (patch) | |
tree | 5c3a2f41abf7c1456a513d410d6038003512cf63 | |
parent | 0d1d9d8001232f74eca63cbba6c400d507b33823 (diff) | |
download | sssd-3f6aecfe5061e165c10829142854ec7189029407.tar.gz sssd-3f6aecfe5061e165c10829142854ec7189029407.tar.xz sssd-3f6aecfe5061e165c10829142854ec7189029407.zip |
SYSDB: Suppress warning from clang static analyser
scan-build wrongly assumes that output variable
"version" is not initialized if function sysdb_cache_connect
returns ERR_SYSDB_VERSION_TOO_OLD or ERR_SYSDB_VERSION_TOO_NEW
The reality is that output variable "version" is initialized
especially for these two case. Initialisation to NULL suppresses
these false positive reports.
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
-rw-r--r-- | src/db/sysdb_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/sysdb_init.c b/src/db/sysdb_init.c index d110aa7a2..538ba027c 100644 --- a/src/db/sysdb_init.c +++ b/src/db/sysdb_init.c @@ -688,7 +688,7 @@ static int sysdb_domain_cache_connect(struct sysdb_ctx *sysdb, struct sysdb_dom_upgrade_ctx *upgrade_ctx) { errno_t ret; - const char *version; + const char *version = NULL; TALLOC_CTX *tmp_ctx; struct ldb_context *ldb; |