Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 2021 21:36:35 GMT
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cbc9be948a3b - main - sifive_uart: quiet GCC -Werror=parentheses
Message-ID:  <202101082136.108LaZj7090866@gitrepo.freebsd.org>

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

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

commit cbc9be948a3bd6ff0f142b8fe995c27d7a06b536
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2021-01-08 21:06:11 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2021-01-08 21:32:18 +0000

    sifive_uart: quiet GCC -Werror=parentheses
    
    Add an additional set of braces to clarify intention. The '&' operator
    has a higher precedence than '|', but the reader may not always remember
    this. No functional change.
---
 sys/riscv/sifive/sifive_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/riscv/sifive/sifive_uart.c b/sys/riscv/sifive/sifive_uart.c
index e06d1fc0b727..cee9ddd0bc25 100644
--- a/sys/riscv/sifive/sifive_uart.c
+++ b/sys/riscv/sifive/sifive_uart.c
@@ -279,7 +279,7 @@ sfuart_bus_flush(struct uart_softc *sc, int what)
 		if (c)							\
 			i |= ((i) & (s)) ? (s) : (s) | (d);		\
 		else		 					\
-			i = ((i) & (s)) ? (i) & ~(s) | (d) : (i);	\
+			i = ((i) & (s)) ? ((i) & ~(s)) | (d) : (i);	\
 	} while (0)
 
 static int



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