diff --git a/server/display-channel.c b/server/display-channel.c index 2ef1c885..f0ff2bde 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -429,7 +429,7 @@ static void current_remove(DisplayChannel *display, TreeItem *item) RingItem *ring_item; if (now->type == TREE_ITEM_TYPE_DRAWABLE) { - Drawable *drawable = SPICE_CONTAINEROF(now, Drawable, tree_item); + Drawable *drawable = SPICE_CONTAINEROF(now, Drawable, tree_item.base); ring_item = now->siblings_link.prev; drawable_remove_from_pipes(drawable); current_remove_drawable(display, drawable); diff --git a/server/sound.c b/server/sound.c index 2d3f393f..0c94964d 100644 --- a/server/sound.c +++ b/server/sound.c @@ -1102,7 +1102,7 @@ SPICE_GNUC_VISIBLE void spice_server_playback_put_samples(SpicePlaybackInstance PlaybackChannel *playback_channel; AudioFrame *frame; - frame = SPICE_CONTAINEROF(samples, AudioFrame, samples); + frame = SPICE_CONTAINEROF(samples, AudioFrame, samples[0]); playback_channel = frame->channel; spice_assert(playback_channel); if (!snd_channel_put(&playback_channel->base) || diff --git a/server/tree.c b/server/tree.c index e5e3c763..9e5a2818 100644 --- a/server/tree.c +++ b/server/tree.c @@ -129,7 +129,7 @@ static void dump_item(TreeItem *item, void *data) switch (item->type) { case TREE_ITEM_TYPE_DRAWABLE: { - Drawable *drawable = SPICE_CONTAINEROF(item, Drawable, tree_item); + Drawable *drawable = SPICE_CONTAINEROF(item, Drawable, tree_item.base); const int max_indent = 200; char indent_str[max_indent + 1]; int indent_str_len;