Bug 271005 - [WPE][GTK] Fix clang warning about use of variable length arrays in C++
Summary: [WPE][GTK] Fix clang warning about use of variable length arrays in C++
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-14 14:14 PDT by Michael Catanzaro
Modified: 2024-03-15 09:49 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2024-03-14 14:14:20 PDT
[34/83] Building CXX object Tools/TestWebKitAPI/glib/CMakeFile...tWebContext.dir/__/Tests/WebKitGLib/TestWebKitWebContext.cpp.o
/home/mcatanzaro/Projects/WebKit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:382:34: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
  382 |     GRefPtr<WebKitWebView> views[numIterations];
      |                                  ^~~~~~~~~~~~~
/home/mcatanzaro/Projects/WebKit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:382:34: note: read of non-const variable 'numIterations' is not allowed in a constant expression
/home/mcatanzaro/Projects/WebKit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:381:9: note: declared here
  381 |     int numIterations = 25;
      |         ^
1 warning generated.
Comment 1 Michael Catanzaro 2024-03-14 15:34:37 PDT
Pull request: https://github.com/WebKit/WebKit/pull/25911
Comment 2 EWS 2024-03-15 09:49:18 PDT
Committed 276168@main (d02f043164f2): <https://commits.webkit.org/276168@main>

Reviewed commits have been landed. Closing PR #25911 and removing active labels.