Date: Sun, 07 Aug 2022 11:54:08 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 265687] openjdk11 fails due to -Wbitwise-instead-of-logical Message-ID: <bug-265687-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265687 Bug ID: 265687 Summary: openjdk11 fails due to -Wbitwise-instead-of-logical Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: se@FreeBSD.org Created attachment 235740 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D235740&action= =3Dedit Store attachment as "files/patch-src_java.desktop_share_native_libharfbuzz_hb-ot-layout-gpos-ta= ble.hh" On -CURRENT building openjdk11 fails with warnings treated as errors, e.g: > * For target support_native_java.desktop_libfontmanager_hb-ot-shape-fallb= ack.o: > In file included from src/java.desktop/share/native/libharfbuzz/hb-ot-sha= pe-fallback.cc:32: > In file included from src/java.desktop/share/native/libharfbuzz/hb-kern.h= h:32: > src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh:1131= :11: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-ins= tead-of-logical] > if (valueFormats[0].apply_value (c, this, &record->values[0], buffe= r->cur_pos()) | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~ > = || > src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh:1131= :11: note: cast one or both operands to int to silence this warning > src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh:1417= :9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-inst= ead-of-logical] > if (valueFormat1.apply_value (c, this, v, buffer->cur_pos()) | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > || > src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh:1417= :9: note: cast one or both operands to int to silence this warning > 2 errors generated. The sources contain a comment: /* Note the intentional use of "|" instead of short-circuit "||". */ above line 1131 and 1417. Casting one operand to int (as suggested in the warning text) does fix the issue (see attached patch). A similar issue might exist in other openjdk ports when built on -CURRENT (= not tested). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265687-7788>