xf86-input-mouse: Changes to 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat May 31 15:21:44 UTC 2025
configure.ac | 2 +-
src/mouse.c | 31 ++++++++++++++++++-------------
src/mouse.h | 10 ++++++++++
src/sun_mouse.c | 2 +-
4 files changed, 30 insertions(+), 15 deletions(-)
New commits:
commit 3a296dfeb928592d9c8907c1cbf16fc8a0fb71ce
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Apr 21 16:46:51 2025 -0700
mouse.c: remove useless cast for return from calloc
It wasn't even casting to the right type of pointer.
Clears warning from gcc 14.2.0:
mouse.c: In function ‘MousePreInit’:
mouse.c:971:19: warning: useless cast to type ‘void *’ [-Wuseless-cast]
971 | if (!(mPriv = (pointer) calloc(1, sizeof(mousePrivRec))))
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
commit 72ed70772ce207caf8be19b4a43d212e54dc54b3
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Apr 21 16:25:40 2025 -0700
mouse.c: remove breaks after return statements [-Wunreachable-code-break]
Clears warnings from clang 19.1.7 of the form:
mouse.c:717:9: warning: 'break' will never be executed
[-Wunreachable-code-break]
717 | break;
| ^~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
commit b6d147fb5302558bcabbaaa2f54a9ed1b5800b7b
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Apr 21 16:19:30 2025 -0700
Make switch fallthrough markers compatible with clang and C23
Uses _X_FALLTHROUGH from xproto 7.0.34 if available,
local fallback if xproto is older than that.
Clears warnings from clang 19.1.7 of the form:
mouse.c:1219:17: warning: unannotated fall-through between switch labels
[-Wimplicit-fallthrough]
1219 | default:
| ^
mouse.c:1219:17: note: insert '[[fallthrough]];' to silence this warning
1219 | default:
| ^
| [[fallthrough]];
mouse.c:1219:17: note: insert 'break;' to avoid fall-through
1219 | default:
| ^
| break;
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
commit 2c481bb0205a319931131e1271f415ef6c974b6f
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Apr 21 14:44:50 2025 -0700
mouse.c: wrap multi-statement macros in do { ... } while (0)
Clears warnings from clang 19.1.7:
mouse.c:2877:31: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
2877 | do_ps2Reset(pInfo);
| ^
mouse.c:3441:29: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
3441 | RESET_VALIDATION;
| ^
[repeated for each call]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
commit 903ef3f54548112ec844aa30631dfe464aa8d028
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Apr 21 14:40:21 2025 -0700
mouse.c: Remove stray semicolons after closing brackets
Clears warnings from clang 19.1.7:
mouse.c:364:14: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
364 | };
| ^
mouse.c:595:13: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
595 | };
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
commit f15c5702f87bb10aa5d5aceff250dfa9d2e1b634
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Apr 21 14:30:36 2025 -0700
mouse.c: handle -Wanalyzer-null-dereference in createProtoList
Should never happen, but the compiler would need to understand the flow
of our state machine to realize that, and this protects us if that ever
changes.
Clears warning from gcc 14.2.0:
mouse.c: In function ‘createProtoList’:
mouse.c:3226:30: warning: dereference of NULL ‘protoList’ [CWE-476]
[-Wanalyzer-null-dereference]
3226 | for (i = 0; protoList[i] != PROT_UNKNOWN; i++) {
| ~~~~~~~~~^~~
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
More information about the xorg-commit
mailing list