[PATCH evemu 6/6] Fix [-Wmissing-field-initializers] warning

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 21 17:50:41 PST 2013


evemu.c:459:16: warning: missing initializer for field 'fuzz' of 'const struct
input_absinfo' [-Wmissing-field-initializers]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evemu.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/evemu.c b/src/evemu.c
index 9aa8e5e..b40b873 100644
--- a/src/evemu.c
+++ b/src/evemu.c
@@ -456,8 +456,12 @@ static int parse_mask(struct evemu_device *dev, const char *line)
 	}
 
 	for (i = 0; i < sizeof(mask) * 8; i++) {
-		const struct input_absinfo abs = {0, 0, 1}; /* dummy */
 		if (bit_is_set(mask, i)) {
+			struct input_absinfo abs = {0}; /* dummy */
+
+			abs.minimum = 0;
+			abs.maximum = 1;
+
 			unsigned int code = dev->mbytes[index] * 8 + i;
 			libevdev_enable_event_code(dev->evdev, index, code, (index == EV_ABS) ? &abs : NULL);
 		}
-- 
1.8.3.1



More information about the Input-tools mailing list