From: Mathieu Desnoyers Date: Wed, 7 Nov 2012 20:08:02 +0000 (-0500) Subject: Fix: add const qualifier for filter local void * X-Git-Tag: v2.1.0-rc2~18 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=59034aabb2f237e81a92d772e2d56e52eb14f1af;p=lttng-ust.git Fix: add const qualifier for filter local void * Signed-off-by: Mathieu Desnoyers --- 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 **); \ }