Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2022 13:58:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        uboot@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 261930] sysutils/dtc: fix build with clang 14
Message-ID:  <bug-261930-39090-KFjA10EFIM@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-261930-39090@https.bugs.freebsd.org/bugzilla/>
References:  <bug-261930-39090@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-uboot (Nobody)
<uboot@FreeBSD.org> for maintainer-feedback:
Bug 261930: sysutils/dtc: fix build with clang 14
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261930



--- Description ---
During an exp-run for llvm 14 (see bug 261742), it turned out that sysutils=
/dtc
fails to build with clang 14:

libfdt/fdt_rw.c:438:6: error: use of bitwise '|' with boolean operands
[-Werror,-Wbitwise-instead-of-logical]
	if (can_assume(LIBFDT_ORDER) |
	    ^~~~~~~~~~~~~~~~~~~~~~~~~~
				     ||
libfdt/libfdt_internal.h:171:29: note: expanded from macro 'can_assume'
#define can_assume(_assume)	can_assume_(ASSUME_ ## _assume)
				^
libfdt/fdt_rw.c:438:6: note: cast one or both operands to int to silence th=
is
warning
libfdt/libfdt_internal.h:171:29: note: expanded from macro 'can_assume'
#define can_assume(_assume)	can_assume_(ASSUME_ ## _assume)
				^
1 error generated.

This looks like a bug in dtc, it should quite obviously use a logical ||
instead of a bitwise | here. I will attach at patch to this bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261930-39090-KFjA10EFIM>