Tell compilers we really meant to assign and then check. The following warning goes away accordingly: | CC nextvclass.lo | nextvclass.c:224:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] | if (comma = strchr(++s, COMMA)) | ~~~~~~^~~~~~~~~~~~~~~~~~~~ | nextvclass.c:224:14: note: use '==' to turn this assignment into an equality comparison | if (comma = strchr(++s, COMMA)) | ^ | == | nextvclass.c:224:14: note: place parentheses around the assignment to silence this warning | if (comma = strchr(++s, COMMA)) | ^ | ( )
Signed-off-by: Cyril Brulebois <k...@debian.org> --- xts5/src/lib/nextvclass.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xts5/src/lib/nextvclass.c b/xts5/src/lib/nextvclass.c index 13b7f6c..7a6a5f2 100644 --- a/xts5/src/lib/nextvclass.c +++ b/xts5/src/lib/nextvclass.c @@ -221,7 +221,7 @@ int Lclass; } Lclass = Nclass; for (s = left_bracket; s; s = comma) { - if (comma = strchr(++s, COMMA)) + if ((comma = strchr(++s, COMMA))) *comma = '\0'; if (*s == '\0') break; -- 1.7.5.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel