1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-17 05:05:14 +03:00
aports/testing/enjoy/0001-fix-printf-format-specifier.patch
Marian Buschsieweke a9c99cfad6 testing/enjoy: new aport
https://github.com/cjacker/enjoy
daemon to map joystick events to mouse/key events
2022-03-23 19:19:09 +00:00

28 lines
1 KiB
Diff

From 33a2902f242ad95308a5970a88369d0100a4c66a Mon Sep 17 00:00:00 2001
From: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Date: Wed, 23 Mar 2022 17:26:05 +0100
Subject: [PATCH] fix printf format specifier
`%ld` is the format specifier for long. The correct format specifier
for `size_t` is `%zu`. Because `%zu` is somewhat obscure, cast the
`size_t` variable to `long` instead and keep `%ld`.
---
enjoy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/enjoy.c b/enjoy.c
index a698f17..4f0bf33 100644
--- a/enjoy.c
+++ b/enjoy.c
@@ -410,7 +410,7 @@ int main(int argc, char *argv[])
break;
char axis_as_mouse_key[20];
- sprintf(axis_as_mouse_key, "axis%ld_as_mouse", axis);
+ sprintf(axis_as_mouse_key, "axis%zu_as_mouse", axis);
/* null to 0. */
if(!(atoi(cfg_get(cfg, axis_as_mouse_key) ? cfg_get(cfg, axis_as_mouse_key) : "0"))) {
if(axes[axis].x != 0 || axes[axis].y != 0)
--
2.35.1