Re: [PATCH v2 07/13] configurator: Fix compiler warning with compare
David Gibson <[email protected]> Tue, 27 Sep 2016 15:09:40 +1000
| Newsgroups | org.ozlabs.lists.ccan |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > Reviewed-by: David Gibson <[email protected]> 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 _______________________________________________ ccan mailing list [email protected] https://lists.ozlabs.org/listinfo/ccan
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX6f8UAAoJEGw4ysog2bOSamMQANxiu06BjZOmYqLr3p+7Oc8S RH9oqoWTUVeXO2Bul0mOVG47l0cGzfDM83M2EFGX7I8ATuyOktzvNk37YxsMbfEV 2nX05rG0qeKIs/q3GaRZgKUBHBNYc4H7tcKD4M36+g31ws8SLcemhALrf/xIvS9r 091BWfJnSrs1KrG+Xu8E5AoG8ZAr724J6g+PijpYWG12IAfpdRW+eRyDm0Q33lAd UEU2aoghsvAabEwHdBBwLgYlDqynlfRaS5yM3t4hRL33lBKnK90K0MZVhkJkeN0A 8iNvuDa8+kHZgM54U0vt0V/YZjexQ9BM7grmsrC821+ZN02BOP5MUAAmfGLxFJRP fdh/d9fQ9DeTEHR935b04YVjky4SjC3uKHFHGhHGWSMUfV0R+04asWRq00c7DUN+ 98lLNIV/xwAee0CtI1FaUvK9ESlrDjboXssZ2PKRLcbsyVRVPtCf+HMvrtM5PDSX Iils2fSjyg22lvvvMEbvquY473ewcIPvkFC1g0XC1zgH50S3kgZLaQyUx3srt+Kh THxppqMSp7h4biq/O6nGPHWATdAZcHsgQL+D1U/wB8Y17eZldvEGrBM2XPlkwf8/ +ulXRQ/21uh8XpRtpNMa4qvbaHqp/Gyw59zKQr18wTa9v5Lm+Jnmecf/fo6yDFuB wvNJpZrNIhNc2Hkx2oAM =dDq0 -----END PGP SIGNATURE-----