git: 1d3ebc894819 - main - comms/bladerf: fix build with clang 21
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Mar 2026 08:32:31 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/ports/commit/?id=1d3ebc89481999cd5696097cf653b8e97f5eb8cb
commit 1d3ebc89481999cd5696097cf653b8e97f5eb8cb
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-23 21:02:54 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-13 08:32:26 +0000
comms/bladerf: fix build with clang 21
With clang 21 comms/bladerf fails to build, with errors similar to:
/wrkdirs/usr/ports/comms/bladerf/work/bladeRF-2025.10/host/utilities/bladeRF-cli/src/cmd/flash_image.c:71:35: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
71 | if (val[i] >= 'a' || val[i] <= 'f') {
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
This is a logic error: the logical operator should be `&&` here. It has
been proposed as an upstream pull request:
https://github.com/Nuand/bladeRF/pull/1045, but it is not yet merged.
PR: 293393
Approved by: maintainer timeout (2 weeks)
MFH: 2026Q1
---
.../patch-host_utilities_bladeRF-cli_src_cmd_flash__image.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/comms/bladerf/files/patch-host_utilities_bladeRF-cli_src_cmd_flash__image.c b/comms/bladerf/files/patch-host_utilities_bladeRF-cli_src_cmd_flash__image.c
new file mode 100644
index 000000000000..3494c23d2ff5
--- /dev/null
+++ b/comms/bladerf/files/patch-host_utilities_bladeRF-cli_src_cmd_flash__image.c
@@ -0,0 +1,11 @@
+--- host/utilities/bladeRF-cli/src/cmd/flash_image.c.orig 2025-10-06 23:06:05 UTC
++++ host/utilities/bladeRF-cli/src/cmd/flash_image.c
+@@ -68,7 +68,7 @@ static int handle_param(const char *param, char *val,
+ status = CLI_RET_INVPARAM;
+ } else {
+ for (i = 0; i < len && status == 0; i++) {
+- if (val[i] >= 'a' || val[i] <= 'f') {
++ if (val[i] >= 'a' && val[i] <= 'f') {
+ val[i] -= 'a' - 'A';
+ } else if (!((val[i] >= '0' && val[i] <= '9') ||
+ (val[i] >= 'A' && val[i] <= 'F'))) {