[pulseaudio-discuss] [PATCH] modules: Fix warning in webrtc AEC
Peter Meerwald
pmeerw at pmeerw.net
Mon Oct 22 14:43:54 PDT 2012
From: Peter Meerwald <p.meerwald at bct-electronic.com>
CXX libwebrtc_util_la-webrtc.lo
modules/echo-cancel/webrtc.cc: In function 'pa_bool_t pa_webrtc_ec_init(pa_core*, pa_echo_canceller*, pa_sample_spec*, pa_channel_map*, pa_sample_spec*, pa_channel_map*, uint32_t*, const char*)':
modules/echo-cancel/webrtc.cc:196:9: warning: 'rm' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>
---
src/modules/echo-cancel/webrtc.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/modules/echo-cancel/webrtc.cc b/src/modules/echo-cancel/webrtc.cc
index c4ec7da..db2a920 100644
--- a/src/modules/echo-cancel/webrtc.cc
+++ b/src/modules/echo-cancel/webrtc.cc
@@ -83,7 +83,7 @@ pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
{
webrtc::AudioProcessing *apm = NULL;
pa_bool_t hpf, ns, agc, dgc, mobile, cn;
- int rm;
+ int rm = -1;
pa_modargs *ma;
if (!(ma = pa_modargs_new(args, valid_modargs))) {
@@ -194,6 +194,7 @@ pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec,
if (agc || dgc) {
if (mobile && rm <= webrtc::EchoControlMobile::kEarpiece) {
+//modules/echo-cancel/webrtc.cc:196:9: warning: 'rm' may be used uninitialized in this function [-Wuninitialized]
/* Maybe this should be a knob, but we've got a lot of knobs already */
apm->gain_control()->set_mode(webrtc::GainControl::kFixedDigital);
ec->params.priv.webrtc.agc = FALSE;
--
1.7.9.5
More information about the pulseaudio-discuss
mailing list