[Webkit-unassigned] [Bug 216215] New: -Wreturn-type warning in BaseAudioContext.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Sep 5 07:07:11 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=216215
Bug ID: 216215
Summary: -Wreturn-type warning in BaseAudioContext.cpp
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at gnome.org
CC: bugs-noreply at webkitgtk.org
[2556/3671] Building CXX object Source...ources/UnifiedSource-4babe430-24.cpp.o
In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-4babe430-24.cpp:3:
../../Source/WebCore/Modules/webaudio/BaseAudioContext.cpp: In member function ‘WebCore::PeriodicWave& WebCore::BaseAudioContext::periodicWave(WebCore::OscillatorType)’:
../../Source/WebCore/Modules/webaudio/BaseAudioContext.cpp:1328:1: warning: control reaches end of non-void function [-Wreturn-type]
1328 | }
| ^
For the past several years, I've been fixing this with RELEASE_ASSERT_NOT_REACHED(). The other alternative would be to CRASH().
In this case, we also have an awkward construction:
case OscillatorType::Custom:
ASSERT_NOT_REACHED();
#ifdef NDEBUG
FALLTHROUGH;
#endif
Which appears to be an attempt to avoid performance penalty form RELEASE_ASSERT_NOT_REACHED(). It's simpler and safer to just use RELEASE_ASSERT_NOT_REACHED().
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200905/6159c0c4/attachment.htm>
More information about the webkit-unassigned
mailing list