]> sigrok.org Git - libsigrok.git/commit
asix-sigma: fix incorrect pointer cast (non-aligned memory and endiannes issue)
authorAurelien Jacobs <redacted>
Fri, 27 Dec 2013 16:29:03 +0000 (17:29 +0100)
committerUwe Hermann <redacted>
Fri, 27 Dec 2013 16:36:08 +0000 (17:36 +0100)
commitc36923b03b343bcdbda55e5167a36e1c63b527a7
tree03382fba464c00fa7fc8d5cc4a8cbdbade5d985e
parent9ee78f234739be21bceb9caef1894dfaab39b8df
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;
    ^
hardware/asix-sigma/asix-sigma.c