Bug 252671
| Summary: | TimingFunction.h -Wdangling-reference warning spam with GCC 13 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | WebCore Misc. | Assignee: | Michael Catanzaro <mcatanzaro> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Michael Catanzaro
This is obviously a false positive (GCC does not understand leakRef), so we'll need to suppress it either individually or project-wide. For now I think only TimingFunction.h is a problem so individual suppressions will suffice.
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h: In static member function 'static const WebCore::LinearTimingFunction& WebCore::LinearTimingFunction::sharedLinearTimingFunction()':
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:75:44: warning: possibly dangling reference to a temporary [-Wdangling-reference]
75 | static const LinearTimingFunction& function = create().leakRef();
| ^~~~~~~~
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:75:71: note: the temporary was destroyed at the end of the full expression 'WebCore::LinearTimingFunction::create()().WTF::Ref<WebCore::LinearTimingFunction>::leakRef()'
75 | static const LinearTimingFunction& function = create().leakRef();
| ~~~~~~~~~~~~~~~~^~
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h: In static member function 'static const WebCore::CubicBezierTimingFunction& WebCore::CubicBezierTimingFunction::defaultTimingFunction()':
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:141:49: warning: possibly dangling reference to a temporary [-Wdangling-reference]
141 | static const CubicBezierTimingFunction& function = create().leakRef();
| ^~~~~~~~
/builddir/build/BUILD/webkitgtk-2.39.90/Source/WebCore/platform/animation/TimingFunction.h:141:76: note: the temporary was destroyed at the end of the full expression 'WebCore::CubicBezierTimingFunction::create()().WTF::Ref<WebCore::CubicBezierTimingFunction>::leakRef()'
141 | static const CubicBezierTimingFunction& function = create().leakRef();
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/106034923>