summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2011-05-25 12:44:53 +0200
committerCyril Brulebois <kibi@debian.org>2011-05-25 12:44:53 +0200
commit4a2f06fef0dd9379549dd90446d6fcbc6333870b (patch)
treeba92b302d4ae5c737f2130d66d4da4afa58c874b
parentf1ac7cde36451c55b640d5ba6e98c2a87ff5413f (diff)
xts5: Add parentheses around assignment in an if.
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 <kibi@debian.org>
-rw-r--r--xts5/src/lib/nextvclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xts5/src/lib/nextvclass.c b/xts5/src/lib/nextvclass.c
index 13b7f6cb..7a6a5f25 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;