Skip to content

Commit

Permalink
kconfig: Make expr_copy() take a const argument
Browse files Browse the repository at this point in the history
Fixes
scripts/kconfig/expr.c: In function ‘expr_get_leftmost_symbol’:
scripts/kconfig/expr.c:1026:2: warning: passing argument 1 of ‘expr_copy’ discards qualifiers from pointer target type
scripts/kconfig/expr.c:67:14: note: expected ‘struct expr *’ but argument is of type ‘const struct expr *’

Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Michal Marek committed Dec 21, 2010
1 parent 1137c56 commit 17742dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/kconfig/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct expr *expr_alloc_or(struct expr *e1, struct expr *e2)
return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
}

struct expr *expr_copy(struct expr *org)
struct expr *expr_copy(const struct expr *org)
{
struct expr *e;

Expand Down
2 changes: 1 addition & 1 deletion scripts/kconfig/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e
struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
struct expr *expr_copy(struct expr *org);
struct expr *expr_copy(const struct expr *org);
void expr_free(struct expr *e);
int expr_eq(struct expr *e1, struct expr *e2);
void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
Expand Down

0 comments on commit 17742dc

Please sign in to comment.