1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-26 01:49:31 +03:00

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 <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Noel Power
2019-07-03 11:34:19 +00:00
committed by Noel Power
parent d759f4aa4b
commit 17ce70d6d9

View File

@ -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;
}