[pulseaudio-discuss] [PATCH] Get rid of some warnings

Maarten Bosmans mkbosmans at gmail.com
Sun Mar 20 14:56:40 PDT 2011


2011/3/20 Colin Guthrie <gmane at colin.guthr.ie>:
> 'Twas brillig, and Maarten Bosmans at 19/03/11 15:26 did gyre and gimble:
>> Mostly warnings about unused stuff.
>> Furthermore, the first hunk is a fix for the change in 177948a6.
>> Finally, comment in AEC_dtd was translated and the code simplified slightly.
>
> Thanks :)
>
>> CC     module_echo_cancel_la-adrian-aec.lo
>> modules/echo-cancel/adrian-aec.h:360:15: warning: ‘AEC_getambient’ defined but not used [-Wunused-function]
>> modules/echo-cancel/adrian-aec.h:368:14: warning: ‘AEC_setgain’ defined but not used [-Wunused-function]
>> modules/echo-cancel/adrian-aec.h:374:14: warning: ‘AEC_setaes’ defined but not used [-Wunused-function]
>> modules/echo-cancel/adrian-aec.h:377:16: warning: ‘AEC_max_dotp_xf_xf’ declared ‘static’ but never defined [-Wunused-function]
>
> Is the Adrian code ours or is it external in some capacity. Arun, if
> it's external and we will update it periodically, can you do the
> necessary to push where it needs to go? (Obviously the PA_GCC_UNUSED
> cannot be pushed anywhere).

I checked that there were already a lot of changes in git after the
inital import, and Arun seems to confirm.
Arun: what is the license of those files?, it doesn't really say in
the header. May be a audit of all files/licenses should be done in
general?

Another thing what bothers me is that is apparantly wasn't clear to
both Colin and me which code is maintained externally and periodically
imported by us and which code was once imported and now maintained in
our tree. Am I right in thinking that only the stuff under
src/modules/bluetooth/sbc is external? Colin's download did seem to
affect some headers under src/modules/bluetooth though. We should
document this somewhere.

>> CC     module_echo_cancel_la-module-echo-cancel.lo
>> modules/echo-cancel/module-echo-cancel.c: In function ‘time_callback’:
>> modules/echo-cancel/module-echo-cancel.c:266:12: warning: variable ‘fs’ set but not used [-Wunused-but-set-variable]
>
> I made a couple tweaks here to use /* */ rather than // as is Lennart's
> general desire (doesn't bother me personally but meh!)

I used //, because that was already used to comment out the places fs
would be used. I think it makes sense to use /* */ exclusively for
textual comments on the workings of the code, but to allow // for
commenting out stuf (just like #ifdef 0), like it is used in
module-echo-cancel there. That way you have the ability to grep for //
and find locations of code that need some more work.

But of course my viewpoint is 'meh' enough not to care strongly either way.

> So merged now.
>
> Col

Maarten



More information about the pulseaudio-discuss mailing list