projects
/
comedilib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bddf043
)
fix strict aliasing warning
author
Frank Mori Hess
<fmhess@speakeasy.net>
Sun, 20 Jun 2004 01:45:16 +0000
(
01:45
+0000)
committer
Frank Mori Hess
<fmhess@speakeasy.net>
Sun, 20 Jun 2004 01:45:16 +0000
(
01:45
+0000)
lib/data.c
patch
|
blob
|
history
diff --git
a/lib/data.c
b/lib/data.c
index ed1c4c33bc24c798eccf37e3e14b58b768a97bcd..3dbf87527fc87c326280cc2ae93f15c71f7ddd9f 100644
(file)
--- 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;