Function arguments with fixed length are still just pointers, so
sizeof(calibration) here is sizeof(float*), not sizeof(float) * 6.
evdev.c: In function 'evdev_device_calibrate':
evdev.c:693:54: warning: argument to 'sizeof' in 'memcpy' call is the same
pointer type 'float *' as the destination; expected 'float' or an explicit
length [-Wsizeof-pointer-memaccess]
memcpy(device->abs.calibration, calibration, sizeof calibration);
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
evdev_device_calibrate(struct evdev_device *device, float calibration[6])
{
device->abs.apply_calibration = 1;
- memcpy(device->abs.calibration, calibration, sizeof calibration);
+ memcpy(device->abs.calibration, calibration, sizeof device->abs.calibration);
}
void