From 59034aabb2f237e81a92d772e2d56e52eb14f1af Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 7 Nov 2012 15:08:02 -0500 Subject: [PATCH] Fix: add const qualifier for filter local void * Signed-off-by: Mathieu Desnoyers --- include/lttng/ust-tracepoint-event.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 2ff736e2..74d06e19 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -296,7 +296,7 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS #define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \ { \ unsigned long __ctf_tmp_ulong = (unsigned long) (_length); \ - void *__ctf_tmp_ptr = (_src); \ + const void *__ctf_tmp_ptr = (_src); \ memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ __stack_data += sizeof(unsigned long); \ memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ @@ -308,7 +308,7 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS _src_length, _encoding, _nowrite) \ { \ unsigned long __ctf_tmp_ulong = (unsigned long) (_src_length); \ - void *__ctf_tmp_ptr = (_src); \ + const void *__ctf_tmp_ptr = (_src); \ memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ __stack_data += sizeof(unsigned long); \ memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ @@ -318,7 +318,7 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS #undef _ctf_string #define _ctf_string(_item, _src, _nowrite) \ { \ - void *__ctf_tmp_ptr = (_src); \ + const void *__ctf_tmp_ptr = (_src); \ memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ __stack_data += sizeof(void **); \ } -- 2.34.1