From: Frank Mori Hess Date: Sun, 20 Jun 2004 01:45:16 +0000 (+0000) Subject: fix strict aliasing warning X-Git-Tag: r0_7_22~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9dd97c647061ebd6507636d4478a2d29fff43533;p=comedilib.git fix strict aliasing warning --- diff --git a/lib/data.c b/lib/data.c index ed1c4c3..3dbf875 100644 --- a/lib/data.c +++ b/lib/data.c @@ -68,15 +68,17 @@ int _comedi_data_write(comedi_t *it,unsigned int subdev,unsigned int chan,unsign trigvar: 0, trigvar1: 0, }; - sampl_t sdata=data; - + sampl_t sdata[2]; + + sdata[0]=data & 0xffff; + sdata[1]=(data >> 16) & 0xffff; chan=CR_PACK(chan,range,aref); cmd.subdev=subdev; if(it->subdevices[subdev].subd_flags & SDF_LSAMPL){ - cmd.data=(sampl_t *)(&data); + cmd.data=sdata; }else{ - cmd.data=&sdata; + cmd.data=sdata; } cmd.chanlist=&chan;