mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 18:40:09 +01:00
evdev: fix memcopy for calibration
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>
This commit is contained in:
parent
adf859c2e9
commit
9e6cf91f48
1 changed files with 1 additions and 1 deletions
|
|
@ -690,7 +690,7 @@ void
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue