Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2021 16:05:33 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d99c87c8d54a - main - evdev: Add parentheses around '-' expression in operand of '&'.
Message-ID:  <202109151605.18FG5XNb086530@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=d99c87c8d54a02a229cbeaa19ec8784b1d5afbb9

commit d99c87c8d54a02a229cbeaa19ec8784b1d5afbb9
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-09-15 16:03:18 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-09-15 16:03:18 +0000

    evdev: Add parentheses around '-' expression in operand of '&'.
    
    This fixes a -Wparentheses error with GCC 9.
    
    Reviewed by:    wulf
    Differential Revision:  https://reviews.freebsd.org/D31947
---
 sys/dev/evdev/evdev_mt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/evdev/evdev_mt.c b/sys/dev/evdev/evdev_mt.c
index a3cb76cbbdb4..1b4ec1233ef2 100644
--- a/sys/dev/evdev/evdev_mt.c
+++ b/sys/dev/evdev/evdev_mt.c
@@ -101,7 +101,7 @@ static void	evdev_mt_replay_events(struct evdev_dev *);
 static inline int
 ffc_slot(struct evdev_dev *evdev, slotset_t slots)
 {
-	return (ffs(~slots & (2U << MAXIMAL_MT_SLOT(evdev)) - 1) - 1);
+	return (ffs(~slots & ((2U << MAXIMAL_MT_SLOT(evdev)) - 1)) - 1);
 }
 
 void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109151605.18FG5XNb086530>