git: 6bd85498ec2d - main - bthidd: declare appropriate size bitstring
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Jul 2024 18:45:19 UTC
The branch main has been updated by rlibby:
URL: https://cgit.FreeBSD.org/src/commit/?id=6bd85498ec2df62aeb8cf9c476daac8a4d9a7a4b
commit 6bd85498ec2df62aeb8cf9c476daac8a4d9a7a4b
Author: Ryan Libby <rlibby@FreeBSD.org>
AuthorDate: 2024-07-09 18:00:33 +0000
Commit: Ryan Libby <rlibby@FreeBSD.org>
CommitDate: 2024-07-09 18:00:33 +0000
bthidd: declare appropriate size bitstring
The bitstring declared on the stack was much too large, and gcc noticed
that we weren't memset()ing all of it. This one was harmless.
Reported by: GCC -Wmemset-elt-size
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D45900
---
usr.sbin/bluetooth/bthidd/kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/bluetooth/bthidd/kbd.c b/usr.sbin/bluetooth/bthidd/kbd.c
index a807a9b27dec..51c12d111c37 100644
--- a/usr.sbin/bluetooth/bthidd/kbd.c
+++ b/usr.sbin/bluetooth/bthidd/kbd.c
@@ -339,7 +339,7 @@ kbd_maxkey(void)
int32_t
kbd_process_keys(bthid_session_p s)
{
- bitstr_t diff[bitstr_size(xsize)];
+ bitstr_t bit_decl(diff, xsize);
int32_t f1, f2, i;
assert(s != NULL);