Skip to content

Commit

Permalink
tools/lib/traceevent/parse-filter.c: clean up clang build warning
Browse files Browse the repository at this point in the history
The uniform structure filter_arg sets its union based on the difference
of enum filter_arg_type, However, some functions use implicit type
conversion obviously.

warning: implicit conversion from enumeration type 'enum filter_exp_type'
	 to different enumeration type 'enum filter_op_type'

warning: implicit conversion from enumeration type 'enum filter_cmp_type'
	 to different enumeration type 'enum filter_exp_type'

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Cheng Jian <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Xie XiuQi <[email protected]>
Cc: Li Bin <[email protected]>
Cc: Steven Rostedt (Red Hat) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Cheng Jian authored and torvalds committed Nov 18, 2017
1 parent 2f9b7e0 commit e4795e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/lib/traceevent/parse-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ create_arg_exp(enum filter_exp_type etype)
return NULL;

arg->type = FILTER_ARG_EXP;
arg->op.type = etype;
arg->exp.type = etype;

return arg;
}

static struct filter_arg *
create_arg_cmp(enum filter_exp_type etype)
create_arg_cmp(enum filter_cmp_type ctype)
{
struct filter_arg *arg;

Expand All @@ -452,7 +452,7 @@ create_arg_cmp(enum filter_exp_type etype)

/* Use NUM and change if necessary */
arg->type = FILTER_ARG_NUM;
arg->op.type = etype;
arg->num.type = ctype;

return arg;
}
Expand Down

0 comments on commit e4795e3

Please sign in to comment.