svn commit: r358030 - projects/clang1000-import/sys/arm/allwinner
Dimitry Andric
dim at FreeBSD.org
Mon Feb 17 18:37:16 UTC 2020
Author: dim
Date: Mon Feb 17 18:37:15 2020
New Revision: 358030
URL: https://svnweb.freebsd.org/changeset/base/358030
Log:
Work around new clang 10.0.0 -Werror warning:
sys/arm/allwinner/aw_cir.c:208:41: error: converting the result of '<<' to a boolean; did you mean '((1 & 255) << 23) != 0'? [-Werror,-Wint-in-bool-context]
active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C ? 128 : 1);
^
sys/arm/allwinner/aw_cir.c:130:39: note: expanded from macro 'AW_IR_ACTIVE_T_C'
#define AW_IR_ACTIVE_T_C ((1 & 0xff) << 23)
^
Add the != 0 part to indicate that we indeed want to compare against
zero.
Modified:
projects/clang1000-import/sys/arm/allwinner/aw_cir.c
Modified: projects/clang1000-import/sys/arm/allwinner/aw_cir.c
==============================================================================
--- projects/clang1000-import/sys/arm/allwinner/aw_cir.c Mon Feb 17 18:31:32 2020 (r358029)
+++ projects/clang1000-import/sys/arm/allwinner/aw_cir.c Mon Feb 17 18:37:15 2020 (r358030)
@@ -205,7 +205,7 @@ aw_ir_decode_packets(struct aw_ir_softc *sc)
device_printf(sc->dev, "sc->dcnt = %d\n", sc->dcnt);
/* Find Lead 1 (bit separator) */
- active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C ? 128 : 1);
+ active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C != 0 ? 128 : 1);
len = 0;
len += (active_delay >> 1);
if (bootverbose)
More information about the svn-src-projects
mailing list