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:
Aurelien Jacobs 2013-12-27 17:29:03 +01:00 committed by Uwe Hermann
parent 9ee78f2347
commit c36923b03b
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}