Re: [spice-protocol PATCH v2 03/10] macros: new define to help with aligment warnings

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

 



Hi,

On Mon, Aug 24, 2015 at 02:07:17PM +0200, Christophe Fergeau wrote:
> I think I'd change the shortlog to
> "macros: add macros to help deal with aligment warnings"
> or something like that

Sure! I'll send a v3 with the changes of your review, many thanks :)
  toso

>
> Christophe
>
> On Fri, Aug 14, 2015 at 06:24:24PM +0200, Victor Toso wrote:
> > and also to help track possible alignment issues.
> > ---
> >  spice/macros.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/spice/macros.h b/spice/macros.h
> > index feac557..463c137 100644
> > --- a/spice/macros.h
> > +++ b/spice/macros.h
> > @@ -423,4 +423,10 @@
> >      ((uint32_t)((s[3]&0xffu)|((s[2]&0xffu)<<8)|((s[1]&0xffu)<<16)|((s[0]&0xffu)<<24)))
> >  #endif
> >  
> > +/* Compiler may complain about alignment which could be a false-posive
> > + * or could be true and problematic depending on the architecture. The
> > + * defines below intend to help track such situations */
> > +#define SPICE_ALIGNED_CAST(type, ptr)   ((type*)(void*)(ptr))
> > +#define SPICE_UNALIGNED_CAST            SPICE_ALIGNED_CAST
> > +
> >  #endif /* _H_SPICE_MACROS */
> > -- 
> > 2.4.3
> > 
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel


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




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