[Bug 276804] devel/bossa: fix build with clang 18

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 03 Feb 2024 13:25:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276804

            Bug ID: 276804
           Summary: devel/bossa: fix build with clang 18
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: kevans@freebsd.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(kevans@freebsd.org)
          Assignee: kevans@freebsd.org

Clang 18 has a new warning about variable length arrays used in C++,
which is emitted when building devel/bossa:

  src/Flasher.cpp:115:28: error: variable length arrays in C++ are a Clang
extension [-Werror,-Wvla-cxx-extension]
    115 |             uint8_t buffer[bufferSize];
        |                            ^~~~~~~~~~
  src/Flasher.cpp:115:28: note: read of non-const variable 'bufferSize' is not
allowed in a constant expression
  src/Flasher.cpp:114:22: note: declared here
    114 |             uint32_t bufferSize = _samba.writeBufferSize();
        |                      ^
  [... more of these ...]

Since refactoring the code to no longer use VLAs is rather intrusive,
suppress the warnings instead.

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