[PATCH v2 07/13] configurator: Fix compiler warning with compare
Kevin Locke <[email protected]> Thu, 22 Sep 2016 21:33:10 -0600
| Newsgroups | org.ozlabs.lists.ccan |
|---|---|
| Message-ID | <2b6fe8f4ad3a5cd16ef3fc8cc0280266380f0de4.1474600863.git.kevin@kevinlocke.name> |
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 <[email protected]> Reviewed-by: David Gibson <[email protected]> --- 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 51d7ac8..acf6cc0 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -572,7 +572,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.9.3 _______________________________________________ ccan mailing list [email protected] https://lists.ozlabs.org/listinfo/ccan