Janitor: gcc 4.5 and sparse warnings.

It is still required a patch in the X Server sdk to correct some
remaining warnings. Isn't it amazing that <X11/extensions/XKBsrv.h>
and $sdkdir/xkbsrv.h both use the #ifndef _XKBSRV_H_ include guard?

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
This commit is contained in:
Paulo Cesar Pereira de Andrade
2009-02-04 18:23:00 -02:00
committed by Sascha Hlusiak
parent 76b82a41a6
commit b70b1f7d82
4 changed files with 9 additions and 5 deletions

View File

@@ -519,7 +519,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
local->private = priv;
local->type_name = XI_JOYSTICK;
local->history_size = 0;
local->always_core_feedback = 0;
local->always_core_feedback = NULL;
local->conf_idev = dev;
priv->fd = -1;

View File

@@ -351,9 +351,9 @@ jstkHandleAbsoluteAxis(LocalDevicePtr device, int number)
{
float rel;
int dif;
if (priv->axis[i].value >= priv->axis[i].deadzone)
if (priv->axis[i].value > priv->axis[i].deadzone)
rel = (priv->axis[i].value - priv->axis[i].deadzone);
if (priv->axis[i].value <= -priv->axis[i].deadzone)
else
rel = (priv->axis[i].value + priv->axis[i].deadzone);
rel = (rel) / (2.0f * (float)(32768 - priv->axis[i].deadzone));

View File

@@ -34,9 +34,14 @@
#include <X11/keysym.h>
#include <X11/XF86keysym.h>
#include <xf86Optrec.h>
#include "jstk.h"
#include "jstk_key.h"
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
#include <xkbsrv.h>
#endif
#define AltMask Mod1Mask
#define NumLockMask Mod2Mask
#define AltLangMask Mod3Mask
@@ -70,7 +75,6 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv)
int i, j;
XkbSrvInfoPtr xkbi;
XkbControlsPtr ctrls;
XkbComponentNamesRec xkbnames;
static struct { KeySym keysym; CARD8 mask; } modifiers[] = {
{ XK_Shift_L, ShiftMask },

View File

@@ -50,7 +50,7 @@
***********************************************************************
*/
int
static int
jstkGetKeyNumberInMap(JoystickDevPtr priv,
KeySym keysym)
{