Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2020 22:08:46 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r358231 - stable/12/sys/arm/allwinner
Message-ID:  <202002212208.01LM8k48009736@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Feb 21 22:08:45 2020
New Revision: 358231
URL: https://svnweb.freebsd.org/changeset/base/358231

Log:
  MFC r358044:
  
  Merge r358030 from the clang1000-import branch:
  
  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:
  stable/12/sys/arm/allwinner/aw_cir.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm/allwinner/aw_cir.c
==============================================================================
--- stable/12/sys/arm/allwinner/aw_cir.c	Fri Feb 21 21:57:24 2020	(r358230)
+++ stable/12/sys/arm/allwinner/aw_cir.c	Fri Feb 21 22:08:45 2020	(r358231)
@@ -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)



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