Skip to content

Commit 24414e3

Browse files
brosier01dleach02
authored andcommitted
subsystem: tracing: test: fix k_pipe_put_* functions
k_pipe_put_* functions should take const void* data instead of void* data. This can lead to warnings at the the -Werror=discarded-qualifiers compiler flag, because the the input will be const void* and the parameter will be void*. Fix it by replacing void* data with “const void* data”. Signed-off-by: Bruce Rosier <brucerosier9@gmail.com>
1 parent 5b232bf commit 24414e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

subsys/tracing/test/tracing_test.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,11 @@ void sys_trace_k_pipe_flush_enter(struct k_pipe *pipe);
625625
void sys_trace_k_pipe_flush_exit(struct k_pipe *pipe);
626626
void sys_trace_k_pipe_buffer_flush_enter(struct k_pipe *pipe);
627627
void sys_trace_k_pipe_buffer_flush_exit(struct k_pipe *pipe);
628-
void sys_trace_k_pipe_put_enter(struct k_pipe *pipe, void *data, size_t bytes_to_write,
628+
void sys_trace_k_pipe_put_enter(struct k_pipe *pipe, const void *data, size_t bytes_to_write,
629629
size_t *bytes_written, size_t min_xfer, k_timeout_t timeout);
630-
void sys_trace_k_pipe_put_blocking(struct k_pipe *pipe, void *data, size_t bytes_to_write,
630+
void sys_trace_k_pipe_put_blocking(struct k_pipe *pipe, const void *data, size_t bytes_to_write,
631631
size_t *bytes_written, size_t min_xfer, k_timeout_t timeout);
632-
void sys_trace_k_pipe_put_exit(struct k_pipe *pipe, void *data, size_t bytes_to_write,
632+
void sys_trace_k_pipe_put_exit(struct k_pipe *pipe, const void *data, size_t bytes_to_write,
633633
size_t *bytes_written, size_t min_xfer, k_timeout_t timeout,
634634
int ret);
635635
void sys_trace_k_pipe_get_enter(struct k_pipe *pipe, void *data, size_t bytes_to_read,

0 commit comments

Comments
 (0)