[PATCH spice-server 2/3] Remove a warning on MIPS machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 server/red-parse-qxl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c
index afae94316..89b61c06f 100644
--- a/server/red-parse-qxl.c
+++ b/server/red-parse-qxl.c
@@ -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 = (SpiceRasterGlyph*) SPICE_ALIGNED_CAST(uint32_t*,
             (((uint8_t *)glyph) +
-             SPICE_ALIGN(sizeof(SpiceRasterGlyph) + glyph_size, 4));
+             SPICE_ALIGN(sizeof(SpiceRasterGlyph) + glyph_size, 4)));
     }
 
     if (free_data) {
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]