From 8824f307f850d8da51304415cf95570c5e983abc Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 27 Apr 2013 11:07:29 -0400 Subject: [PATCH] Cleanup: silence cppcheck error Not an error per se, but silences: /home/jenkins/workspace/lttng-ust-cppcheck/liblttng-ust/lttng-ring-buffer-client.h 429 uninitvar error Uninitialized variable: lttng_chan /home/jenkins/workspace/lttng-ust-cppcheck/liblttng-ust/lttng-ring-buffer-metadata-client.h 197 uninitvar error Uninitialized variable: lttng_chan Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-ring-buffer-client.h | 3 ++- liblttng-ust/lttng-ring-buffer-metadata-client.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index c65a50ef..72b6d2c8 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -426,7 +426,8 @@ struct lttng_channel *_channel_create(const char *name, memcpy(chan_priv_init.uuid, uuid, LTTNG_UST_UUID_LEN); chan_priv_init.id = chan_id; handle = channel_create(&client_config, name, - &priv, __alignof__(*lttng_chan), sizeof(*lttng_chan), + &priv, __alignof__(struct lttng_channel), + sizeof(struct lttng_channel), &chan_priv_init, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h index 7dbdb821..89f2620c 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -194,7 +194,8 @@ struct lttng_channel *_channel_create(const char *name, memcpy(chan_priv_init.uuid, uuid, LTTNG_UST_UUID_LEN); chan_priv_init.id = chan_id; handle = channel_create(&client_config, name, - &priv, __alignof__(*lttng_chan), sizeof(*lttng_chan), + &priv, __alignof__(struct lttng_channel), + sizeof(struct lttng_channel), &chan_priv_init, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); -- 2.34.1