mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
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'
^
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'
^
This should have been a logical or instead. Upstream fixed this in:
7be250b4d0
PR: 261930
Approved by: maintainer timeout (2 weeks)
MFH: 2022Q1
11 lines
379 B
C
11 lines
379 B
C
--- libfdt/fdt_rw.c.orig 2020-03-04 06:14:58 UTC
|
|
+++ libfdt/fdt_rw.c
|
|
@@ -435,7 +435,7 @@ int fdt_open_into(const void *fdt, void *buf, int bufs
|
|
return struct_size;
|
|
}
|
|
|
|
- if (can_assume(LIBFDT_ORDER) |
|
|
+ if (can_assume(LIBFDT_ORDER) ||
|
|
!fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
|
|
/* no further work necessary */
|
|
err = fdt_move(fdt, buf, bufsize);
|