Remove a warning on MIPS machine

The formula is here to make sure glyph is aligned to 4 bytes so
tell to the compiler to avoid a warning.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
This commit is contained in:
Frediano Ziglio 2018-06-05 00:27:37 +01:00
parent 47cbfd4c59
commit 6412760873

View File

@ -941,9 +941,9 @@ static SpiceString *red_get_string(RedMemSlotInfo *slots, int group_id,
spice_assert(glyph_size <= (char*) end - (char*) &start->data[0]);
memcpy(glyph->data, start->data, glyph_size);
start = (QXLRasterGlyph*)(&start->data[glyph_size]);
glyph = (SpiceRasterGlyph*)
glyph = SPICE_ALIGNED_CAST(SpiceRasterGlyph*,
(((uint8_t *)glyph) +
SPICE_ALIGN(sizeof(SpiceRasterGlyph) + glyph_size, 4));
SPICE_ALIGN(sizeof(SpiceRasterGlyph) + glyph_size, 4)));
}
if (free_data) {