From 563ec0870cee828240b9f2112f5bd31284e31448 Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Thu, 22 Sep 2016 21:33:10 -0600 Subject: [PATCH] configurator: Fix compiler warning with compare Visual Studio prints warning C4706 "assignment within conditional expression" when there is an assignment without a comparison in a conditional expression. Therefore, to silence the warning, add an explicit comparison. Signed-off-by: Kevin Locke Reviewed-by: David Gibson Signed-off-by: David Gibson --- tools/configurator/configurator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index daa90ee3..e9ff5ef1 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -489,7 +489,7 @@ static bool run_test(const char *cmd, struct test *test) char *dep; /* Space-separated dependencies, could be ! for inverse. */ - while ((len = strcspn(deps, " "))) { + while ((len = strcspn(deps, " ")) != 0) { bool positive = true; if (deps[len]) { dep = strdup(deps); -- 2.39.2