maintainer-feedback requested: [Bug 261930] sysutils/dtc: fix build with clang 14
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 261930] sysutils/dtc: fix build with clang 14"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 13 Feb 2022 13:58:28 UTC
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=261930 --- 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 this 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.