diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-06-07 13:11:14 +0200 |
---|---|---|
committer | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-06-07 14:23:37 +0200 |
commit | 3a407a34c4a2b6b263a535b6aa7b49dd70784fdf (patch) | |
tree | 8d5c1dd39223e9e168a3e28680a11ea107de928a | |
parent | 8a0623033c229291edeed6b6651a259a819d5b26 (diff) |
build breaks due integer size mismatch:
> ../../src/dummy_driver.c: In function 'dummy_output_mode_set':
> ../../src/dummy_driver.c:246:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 246 | int index = (int64_t)output->driver_private;
> | ^
> ../../src/dummy_driver.c: In function 'dummy_output_detect':
> ../../src/dummy_driver.c:258:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 258 | int index = (int64_t)output->driver_private;
> | ^
Need to use uintptr_t instead of plain int.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-dummy/-/merge_requests/13>
-rw-r--r-- | src/dummy_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dummy_driver.c b/src/dummy_driver.c index 0efcf8e..0f517a1 100644 --- a/src/dummy_driver.c +++ b/src/dummy_driver.c @@ -243,7 +243,7 @@ dummy_output_mode_set (xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode) { DUMMYPtr dPtr = DUMMYPTR(output->scrn); - int index = (int64_t)output->driver_private; + uintptr_t index = (uintptr_t)output->driver_private; /* set to connected at first mode set */ dPtr->connected_outputs |= 1 << index; @@ -255,7 +255,7 @@ static xf86OutputStatus dummy_output_detect (xf86OutputPtr output) { DUMMYPtr dPtr = DUMMYPTR(output->scrn); - int index = (int64_t)output->driver_private; + uintptr_t index = (uintptr_t)output->driver_private; if (dPtr->connected_outputs & (1 << index)) return XF86OutputStatusConnected; |