From: Mathieu Desnoyers Date: Sat, 27 Apr 2013 15:07:29 +0000 (-0400) Subject: Cleanup: silence cppcheck error X-Git-Tag: v2.2.0-rc2~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8824f307f850d8da51304415cf95570c5e983abc;p=lttng-ust.git 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 --- 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);