Powered by Linux
[PATCH] untracked_param: fix compilation errors with GCC 14 — Semantic Matching Tool

[PATCH] untracked_param: fix compilation errors with GCC 14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



select_return_states_hook expects that the passed function does not declare
the key and value arguments as const.

Signed-off-by: Lukáš Zaoral <lzaoral@xxxxxxxxxx>
---
 smatch.h                 | 2 +-
 smatch_untracked_param.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/smatch.h b/smatch.h
index ce09ae73..ecdbe684 100644
--- a/smatch.h
+++ b/smatch.h
@@ -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));
diff --git a/smatch_untracked_param.c b/smatch_untracked_param.c
index b7230f06..a84889ca 100644
--- a/smatch_untracked_param.c
+++ b/smatch_untracked_param.c
@@ -120,12 +120,12 @@ free:
 
 }
 
-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);
 }
-- 
2.43.0





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux