Sensor: Fix aliasing violation

Change-Id: I98a8aa242d017fba4779bbb36eb5d392471e1e46
Signed-off-by: zwliew <zhaoweiliew@gmail.com>