diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2022-02-09 10:12:08 -0800 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-02-11 00:19:57 +0000 |
| commit | 81b9ee66b8e40ed145185fe46b7c91929688cafd (patch) | |
| tree | 25599639164d7fb50c29c987ba6837a5a02aab07 /src/concurrent/qtconcurrentrun.cpp | |
| parent | 0a41399c2d1a5c2a1508bbc195c700d1a5c76ea8 (diff) | |
QLibrary: Suppress GCC 12 warning about dangling pointer access
Introduced in commit d07742f333df89dc399fc5d9cabf2bdef0b346c5. Reported
by GCC 12:
qlibrary.cpp:672:9: error: dangling pointer to ‘candidates’ may be used [-Werror=dangling-pointer=]
672 | if (isValidSuffix(*it++))
| ^~
qlibrary.cpp:634:29: note: ‘candidates’ declared here
634 | const QLatin1String candidates[] = {
| ^~~~~~~~~~
This is a false positive report because the lambda does not return a
pointer or iterator. But it's a good update anyway to keep the array
outside the lambda, so it won't be recreated every time.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104492
Pick-to: 6.3
Change-Id: I74249c52dc02478ba93cfffd16d230abd1bf6166
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentrun.cpp')
0 files changed, 0 insertions, 0 deletions
