Hey, On Tue, Jun 20, 2017 at 02:52:56PM +0100, Frediano Ziglio wrote: > memmove already deal with any alignment so there's no > reason to have row byte pointer cast to uint32_t. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > common/canvas_base.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/common/canvas_base.c b/common/canvas_base.c > index 5815e9c..5b3649d 100644 > --- a/common/canvas_base.c > +++ b/common/canvas_base.c > @@ -522,9 +522,9 @@ static void canvas_fix_alignment(uint8_t *bits, > int row; > uint8_t *dest = bits; > for (row = height - 1; row > 0; --row) { > - uint32_t *dest_aligned, *dest_misaligned; > - dest_aligned = SPICE_ALIGNED_CAST(uint32_t *,dest + stride_pixman*row); > - dest_misaligned = SPICE_UNALIGNED_CAST(uint32_t*,dest + stride_encoded*row); > + uint8_t *dest_aligned, *dest_misaligned; > + dest_aligned = dest + stride_pixman*row; > + dest_misaligned = dest + stride_encoded*row; Not related to your change, but 'dest' does not seem useful here, and "dest_misaligned" seems badly named, it seems to be more of a "src_misaligned". I think I'd just kill 'dest', rename 'dest_aligned' to 'dest', and 'dest_misaligned' to 'src' (the "Fix the row alignment" comment should be good enough to hint that something is misaligned). Regardless of these OT comments, for this patch Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel