Skip to content

Commit

Permalink
untracked_param: fix compilation errors with GCC 14
Browse files Browse the repository at this point in the history
select_return_states_hook expects that the passed function does not declare
the key and value arguments as const.

Signed-off-by: Lukáš Zaoral <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
  • Loading branch information
lzaoral authored and Dan Carpenter committed Jan 22, 2024
1 parent ea66e8f commit 223d2a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion smatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ bool buf_comp2_has_bytes(struct expression *buf_expr, struct expression *var);
bool buf_has_bytes(struct expression *buf, struct expression *var);

/* smatch_untracked_param.c */
void mark_untracked(struct expression *expr, int param, const char *key, const char *value);
void mark_untracked(struct expression *expr, int param, char *key, char *value);
void mark_call_params_untracked(struct expression *call);
void add_untracked_param_hook(void (func)(struct expression *call, int param));
void add_lost_param_hook(void (func)(struct expression *call, int param));
Expand Down
4 changes: 2 additions & 2 deletions smatch_untracked_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ static void mark_untracked_lost(struct expression *expr, int param, const char *

}

void mark_untracked(struct expression *expr, int param, const char *key, const char *value)
void mark_untracked(struct expression *expr, int param, char *key, char *value)
{
mark_untracked_lost(expr, param, key, UNTRACKED_PARAM);
}

void mark_lost(struct expression *expr, int param, const char *key, const char *value)
void mark_lost(struct expression *expr, int param, char *key, char *value)
{
mark_untracked_lost(expr, param, key, LOST_PARAM);
}
Expand Down

0 comments on commit 223d2a8

Please sign in to comment.