Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: webrtc/modules/audio_processing/level_controller/level_controller.cc

Issue 3007153003: Enable UBSan float-cast-overflow warnings and fix existing ones (Closed)
Patch Set: Fix/silence existing warnings Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/base/rtpdataengine.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/level_controller/level_controller.cc
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.cc b/webrtc/modules/audio_processing/level_controller/level_controller.cc
index 028501c5c03bd3e3904710d275f65855d02be6f1..6edae5c38a8039b72c3df2a62a1815f1bda0ed7a 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller.cc
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.cc
@@ -49,7 +49,7 @@ float FrameEnergy(const AudioBuffer& audio) {
for (size_t k = 0; k < audio.num_channels(); ++k) {
float channel_energy =
std::accumulate(audio.channels_const_f()[k],
- audio.channels_const_f()[k] + audio.num_frames(), 0,
+ audio.channels_const_f()[k] + audio.num_frames(), 0.f,
saza WebRTC 2017/09/05 09:35:20 Good find. Fyi, aleloi@ or hlundin@ are the least
[](float a, float b) -> float { return a + b * b; });
energy = std::max(channel_energy, energy);
}
« no previous file with comments | « webrtc/media/base/rtpdataengine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698