[Spice-devel] [spice v2 1/3] server: Fix a pointer to uint64_t cast in spice_replay_next_cmd()

Christophe Fergeau cfergeau at redhat.com
Tue Jan 12 06:59:59 PST 2016


On Tue, Jan 12, 2016 at 09:56:03AM -0500, Frediano Ziglio wrote:
> > 
> > On Tue, Jan 12, 2016 at 04:11:20AM -0500, Frediano Ziglio wrote:
> > > > 
> > > > This avoids a compilation error with -Werror on 32 bit systems as the
> > > > pointer size differs from that of an uint64_t.
> > > > 
> > > > Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> > > > ---
> > > >  server/red-replay-qxl.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
> > > > index 66acf1e..7a146b6 100644
> > > > --- a/server/red-replay-qxl.c
> > > > +++ b/server/red-replay-qxl.c
> > > > @@ -1156,7 +1156,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt*
> > > > spice_replay_next_cmd(SpiceReplay *replay,
> > > >      case QXL_CMD_UPDATE:
> > > >      case QXL_CMD_SURFACE:
> > > >          info = (QXLReleaseInfo *)cmd->cmd.data;
> > > > -        info->id = (uint64_t)cmd;
> > > > +        info->id = (uint64_t)(uintptr_t)cmd;
> > > >      }
> > > >  
> > > >      replay->counter++;
> > > > --
> > > > 2.6.4
> > > > 
> > > 
> > > I was suggesting just
> > > 
> > >   info->id = (uintptr_t)cmd;
> > 
> > Hmm, just received this email, and the v3 patch series now, hours after
> > having pushed that series. Weird. Good that it was just a minor changed
> > that I missed, sorry for the inconvenience.
> > 
> > Christophe
> > 
> 
> Not a big deal, just you won't get a warning when you compile on a 128 bit
> architecture :(

ACK for a followup patch changing just that, but I really don't think
this is going to be our biggest problem if that happens :)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20160112/dc9758ec/attachment.sig>


More information about the Spice-devel mailing list