From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> As both the name and cpu_pid return pointers to the actual data of the tracecmd_handle, they should be constant to make sure that the callers do not try to modify them. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- include/trace-cmd/trace-cmd.h | 4 ++-- lib/trace-cmd/trace-input.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h index 0375f500..2643b889 100644 --- a/include/trace-cmd/trace-cmd.h +++ b/include/trace-cmd/trace-cmd.h @@ -157,8 +157,8 @@ unsigned long tracecmd_get_flags(struct tracecmd_input *handle); unsigned long long tracecmd_get_traceid(struct tracecmd_input *handle); int tracecmd_get_guest_cpumap(struct tracecmd_input *handle, unsigned long long trace_id, - char **name, - int *vcpu_count, int **cpu_pid); + const char **name, + int *vcpu_count, const int **cpu_pid); unsigned long long tracecmd_get_tsync_peer(struct tracecmd_input *handle); int tracecmd_enable_tsync(struct tracecmd_input *handle, bool enable); diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index faf6a795..c1531410 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -3695,8 +3695,8 @@ unsigned long long tracecmd_get_traceid(struct tracecmd_input *handle) */ int tracecmd_get_guest_cpumap(struct tracecmd_input *handle, unsigned long long trace_id, - char **name, - int *vcpu_count, int **cpu_pid) + const char **name, + int *vcpu_count, const int **cpu_pid) { struct guest_trace_info *guest = handle->guest; -- 2.20.1