sval: delete unused filter_range_list() function
[smatch.git] / check_assign_vs_compare.c
bloba0ea87e7fa881a73f5d25e944a7f82c2f7b79e4e
1 /*
2 * smatch/check_assign_vs_compare.c
4 * Copyright (C) 2012 Oracle.
6 * Licensed under the Open Software License version 1.1
8 */
10 #include "smatch.h"
12 static int my_id;
14 static void match_condition(struct expression *expr)
16 sval_t val;
18 if (expr->type != EXPR_ASSIGNMENT || expr->op != '=')
19 return;
21 if (!get_value_sval(expr->right, &val))
22 return;
23 sm_msg("warn: was '== %s' instead of '='", sval_to_str(val));
26 void check_assign_vs_compare(int id)
28 my_id = id;
29 add_hook(&match_condition, CONDITION_HOOK);