HomeFreeBSD

devel/bossa: fix build with clang 18

Description

devel/bossa: fix build with clang 18

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.

While here, pet portlint.

PR: 276804
Approved by: maintainer timeout (2 weeks)
MFH: 2024Q1

(cherry picked from commit 30a231f8eb872f67eac8514ba96da91cc4b9f44f)

Details

Provenance
dimAuthored on Feb 3 2024, 1:21 PM
Parents
R11:06461695b351: lang/parrot: this is not really Perl
Branches
Unknown
Tags
Unknown