implied: remove some unused code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 Jul 2013 12:05:31 +0000 (10 15:05 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 Jul 2013 12:05:31 +0000 (10 15:05 +0300)
The get_implications() function is never called.  It seems like a good
idea but the API is wrong so I am deleting it for now.

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

index 02c460e..5825fdc 100644 (file)
--- a/smatch.h
+++ b/smatch.h
@@ -377,9 +377,6 @@ int __handle_expr_statement_assigns(struct expression *expr);
 extern int option_debug_implied;
 extern int option_debug_related;
 extern int option_no_implied;
-void get_implications(char *name, struct symbol *sym, int comparison, long long num,
-                     struct state_list **true_states,
-                     struct state_list **false_states);
 struct range_list_stack;
 struct state_list *__implied_case_slist(struct expression *switch_expr,
                                        struct expression *case_expr,
index b29167c..9952c14 100644 (file)
@@ -622,23 +622,6 @@ static void match_end_func(struct symbol *sym)
        implied_debug_msg = NULL;
 }
 
-/*
- * get_implications() can be called by check_ scripts.
- */
-void get_implications(char *name, struct symbol *sym, int comparison, long long num,
-                     struct state_list **true_states,
-                     struct state_list **false_states)
-{
-       struct sm_state *sm;
-
-       sm = get_sm_state(SMATCH_EXTRA, name, sym);
-       if (!sm)
-               return;
-       if (slist_has_state(sm->possible, &undefined))
-               return;
-       separate_and_filter(sm, comparison, tmp_range_list(num), LEFT, __get_cur_slist(), true_states, false_states);
-}
-
 static int sm_state_in_slist(struct sm_state *sm, struct state_list *slist)
 {
        struct sm_state *tmp;