comparison: ignore assigns like += or /= for now
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Jun 2013 06:12:53 +0000 (28 09:12 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Jun 2013 06:12:53 +0000 (28 09:12 +0300)
Eventually I will want to handle these but for now they are just causing
bugs so ignore them.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_comparison.c

index e78305b..0aa1706 100644 (file)
@@ -900,6 +900,9 @@ static void match_assign(struct expression *expr)
 {
        struct expression *right;
 
+       if (expr->op != '=')
+               return;
+
        copy_comparisons(expr->left, expr->right);
        add_comparison(expr->left, SPECIAL_EQUAL, expr->right);