asix-sigma: fix incorrect pointer cast (non-aligned memory and endiannes issue)
This fixes the following warning: asix-sigma.c: In function 'receive_data': asix-sigma.c:1064:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] devc->state.lastts = *(uint16_t *) buf - 1; ^
This commit is contained in:
parent
9ee78f2347
commit
c36923b03b
|
@ -1061,7 +1061,7 @@ static int receive_data(int fd, int revents, void *cb_data)
|
|||
|
||||
/* Find first ts. */
|
||||
if (devc->state.chunks_downloaded == 0) {
|
||||
devc->state.lastts = *(uint16_t *) buf - 1;
|
||||
devc->state.lastts = RL16(buf) - 1;
|
||||
devc->state.lastsample = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue