From f01691b5f1ec800f7f717f4358197d99c17f35a7 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Thu, 1 Sep 2016 17:25:23 +0200 Subject: [PATCH] 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 suppress these false positive reports. --- src/db/sysdb_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/sysdb_init.c b/src/db/sysdb_init.c index d110aa7a2878e47650db177cfd342d0ac32248ab..538ba027cd94e274ba328d398cc565b11ea56f39 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; -- 2.9.3