Bug 293393 - comms/bladerf: fix build with clang 21
Summary: comms/bladerf: fix build with clang 21
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-23 21:02 UTC by Dimitry Andric
Modified: 2026-03-13 08:43 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
comms/bladerf: fix build with clang 21 (1.77 KB, patch)
2026-02-23 21:03 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2026-02-23 21:02:39 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-23 21:03:20 UTC
Created attachment 268307 [details]
comms/bladerf: fix build with clang 21
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-03-13 08:32:38 UTC
A commit in branch main references this bug:

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

 ...ch-host_utilities_bladeRF-cli_src_cmd_flash__image.c (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)