[ccan] [PATCH v2 07/13] configurator: Fix compiler warning with compare
David Gibson
david at gibson.dropbear.id.au
Tue Sep 27 15:09:40 AEST 2016
On Thu, Sep 22, 2016 at 09:33:10PM -0600, Kevin Locke wrote:
> 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 <kevin at kevinlocke.name>
> Reviewed-by: David Gibson <david at gibson.dropbear.id.au>
Applying.
> ---
> 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);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20160927/16ae1127/attachment-0001.sig>
More information about the ccan
mailing list