summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-08 13:54:12 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-08 13:54:12 -0800
commitebf3e47c68089d7af6fb6971bdd33185ba83678c (patch)
tree1cc8941cff01994de205cd74fede3b3e80da36a5
parentc13fd78b539407b4c7c6bb7a47fc470866fe48a1 (diff)
Quiet 3 -Wdeclaration-after-statement warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/nested_input.c6
-rw-r--r--src/xlibclient.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/nested_input.c b/src/nested_input.c
index 9d2e0d3..b674c35 100644
--- a/src/nested_input.c
+++ b/src/nested_input.c
@@ -194,8 +194,7 @@ _nested_input_init_buttons(DeviceIntPtr device) {
map = calloc(NUM_MOUSE_BUTTONS, sizeof(CARD8));
- int i;
- for (i = 0; i < NUM_MOUSE_BUTTONS; i++)
+ for (int i = 0; i < NUM_MOUSE_BUTTONS; i++)
map[i] = i;
if (!InitButtonClassDeviceStruct(device, NUM_MOUSE_BUTTONS, buttonLabels, map)) {
@@ -218,8 +217,7 @@ _nested_input_init_axes(DeviceIntPtr device) {
return BadAlloc;
}
- int i;
- for (i = 0; i < NUM_MOUSE_AXES; i++) {
+ for (int i = 0; i < NUM_MOUSE_AXES; i++) {
xf86InitValuatorAxisStruct(device, i, (Atom)0, -1, -1, 1, 1, 1, Absolute);
xf86InitValuatorDefaults(device, i);
}
diff --git a/src/xlibclient.c b/src/xlibclient.c
index 10ab970..7d5a66d 100644
--- a/src/xlibclient.c
+++ b/src/xlibclient.c
@@ -254,8 +254,9 @@ xf86DrvMsg(scrnIndex, X_INFO, "blu_mask: 0x%lx\n", pPriv->img->blue_mask);
*retGreenMask = pPriv->img->green_mask;
*retBlueMask = pPriv->img->blue_mask;
- XEvent ev;
while (1) {
+ XEvent ev;
+
XNextEvent(pPriv->display, &ev);
if (ev.type == Expose) {
break;