Fix: add const qualifier for filter local void *
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Nov 2012 20:08:02 +0000 (15:08 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Nov 2012 20:08:02 +0000 (15:08 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-tracepoint-event.h

index 2ff736e2f5c1cd2ad6581c9d3330d9eb43165586..74d06e19ad182fc5b8b863543116581f6ae12240 100644 (file)
@@ -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 **);                               \
        }
This page took 0.026662 seconds and 4 git commands to generate.