Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Dec 2023 14:02:41 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4d9951cbb68b - stable/13 - Silence VLA extension warnings in fusefs tests
Message-ID:  <202312241402.3BOE2f0P057418@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d9951cbb68b76d385264e222e5cf74a993b127e

commit 4d9951cbb68b76d385264e222e5cf74a993b127e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-12-21 22:41:57 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-24 14:01:24 +0000

    Silence VLA extension warnings in fusefs tests
    
    Building tests/sys/fs/fusefs with clang 18 results the following
    warning:
    
      tests/sys/fs/fusefs/cache.cc:145:14: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
        145 |         uint8_t buf[bufsize];
            |                     ^~~~~~~
    
    Because we do not particularly care that this is a clang extension,
    suppress the warning.
    
    MFC after:      3 days
    
    (cherry picked from commit dc0b4094abf6784bf1a9492c2fea3fb91116b014)
---
 tests/sys/fs/fusefs/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile
index f62b88fe9271..8e6fdd10c377 100644
--- a/tests/sys/fs/fusefs/Makefile
+++ b/tests/sys/fs/fusefs/Makefile
@@ -81,6 +81,10 @@ CXXWARNFLAGS+=	-Wno-class-memaccess
 .endif
 # Supress warnings about deprecated implicit copy constructors in gtest.
 CXXWARNFLAGS+=  -Wno-deprecated-copy
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000
+# clang 18.0.0 introduces a new warning about variable length arrays in C++.
+CXXWARNFLAGS+=	-Wno-vla-cxx-extension
+.endif
 CXXFLAGS+=	-I${SRCTOP}/tests
 CXXFLAGS+=	-I${FUSEFS}
 CXXFLAGS+=	-I${MOUNT}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312241402.3BOE2f0P057418>