From: Mathieu Desnoyers Date: Wed, 12 Nov 2014 21:05:36 +0000 (-0500) Subject: Fix coverity warning about sizeof(void **) != sizeof(void *) X-Git-Tag: v2.5.2~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=98f3fb23cdf46c5220ff613fe6aa4fc13e4daf86;p=lttng-ust.git Fix coverity warning about sizeof(void **) != sizeof(void *) The size of the copied data is actually void *, not void **. Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 88953108..3f99f662 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -385,8 +385,8 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS 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 **)); \ - __stack_data += sizeof(void **); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ } #undef _ctf_sequence_encoded @@ -397,16 +397,16 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS 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 **)); \ - __stack_data += sizeof(void **); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ } #undef _ctf_string #define _ctf_string(_item, _src, _nowrite) \ { \ const void *__ctf_tmp_ptr = (_src); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ - __stack_data += sizeof(void **); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ } #undef TP_ARGS