From 17ce70d6d9cb40afc38e41af3f0fd9ed052fb8a2 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Wed, 3 Jul 2019 11:34:19 +0000 Subject: [PATCH] lib/param: clang: Fix Value stored is never read Fixes: lib/param/loadparm.c:2164:2: warning: Value stored to 'bRetval' is never read <--[clang] bRetval = false; ^ ~~~~~ 1 warning generated. Signed-off-by: Noel Power Reviewed-by: Gary Lockyer --- lib/param/loadparm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 239d671803f..26b61789b3f 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -2161,15 +2161,14 @@ static bool do_section(const char *pszSectionName, void *userdata) isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) || (strwicmp(pszSectionName, GLOBAL_NAME2) == 0)); - bRetval = false; - /* if we've just struck a global section, note the fact. */ lp_ctx->bInGlobalSection = isglobal; /* check for multiple global sections */ if (lp_ctx->bInGlobalSection) { DEBUG(4, ("Processing section \"[%s]\"\n", pszSectionName)); - return true; + bRetval = true; + goto out; } /* if we have a current service, tidy it up before moving on */ @@ -2188,10 +2187,11 @@ static bool do_section(const char *pszSectionName, void *userdata) pszSectionName)) == NULL) { DEBUG(0, ("Failed to add a new service\n")); - return false; + bRetval = false; + goto out; } } - +out: return bRetval; } -- 2.47.3