[Bug 261930] sysutils/dtc: fix build with clang 14

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 13 Feb 2022 13:58:28 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261930

            Bug ID: 261930
           Summary: sysutils/dtc: fix build with clang 14
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: uboot@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(uboot@FreeBSD.org)
          Assignee: uboot@FreeBSD.org

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.