From b888251a032dfff5f7219334d2e8f256251fa98e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 16 Oct 2022 12:07:37 -0700 Subject: [PATCH] InputDriverRec: Fix -Wmissing-field-initializers warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mouse.c:185:1: warning: missing initializer for field ‘default_options’ of ‘InputDriverRec {aka struct _InputDriverRec}’ [-Wmissing-field-initializers] }; ^ In file included from mouse.c:63:0: /usr/include/xorg/xf86Xinput.h:83:18: note: ‘default_options’ declared here const char **default_options; ^~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith --- src/mouse.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/mouse.c b/src/mouse.c index 4cb9de1..68620bd 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -176,12 +176,18 @@ static Bool autoGood(MouseDevPtr pMse); #undef MOUSE _X_EXPORT InputDriverRec MOUSE = { - 1, - "mouse", - NULL, - MousePreInit, - NULL, - NULL, + .driverVersion = 1, + .driverName = "mouse", + .Identify = NULL, + .PreInit = MousePreInit, + .UnInit = NULL, + .module = NULL, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 + .default_options = NULL, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 21 + .capabilities = 0 +#endif +#endif }; #define RETRY_COUNT 4