On Mon, 2005-09-05 at 10:29 +1000, Jean-Marc Valin wrote:> > attached is a patch fixing some build warnings with ip3k-elf-gcc > > (gcc 3.4-20030722-Ubicom-63-1211). not all fixes are elegant, > > please review carefully before applying.. > > Euh, could you explain what's wrong with "start" and "end"? Also, AFAIK, > (int)floor(something) is valid, no? >there is nothing wrong with "start" and "end", but in the Ubicom OS there is a global function called "start()" which gives the warning: libspeex/ltp.c:573: warning: declaration of "start" shadows a global declaration build/include/UbicomSDK.h:5651: warning: shadowed declaration is here also this line gives a warning: v1=(int)floor(st->vbr_quality); libSpeex/libspeex/nb_celp.c: In function `nb_encode': libSpeex/libspeex/nb_celp.c:465: warning: cast does not match function type my CFLAGS include this: -Wall \ -Wstrict-prototypes \ -Wshadow \ -Wundef \ -Wbad-function-cast \ -Wcast-align \ -Wsign-compare \ perhaps we should add a few of these to libspeex ? attached is a new and less intrusive patch, please review.. ;) /alfred> Jean-Marc > > > > > /alfred > > > > _______________________________________________ > > Speex-dev mailing list > > Speex-dev@xiph.org > > http://lists.xiph.org/mailman/listinfo/speex-dev-------------- next part -------------- A non-text attachment was scrubbed... Name: warnings2.diff Type: text/x-patch Size: 1902 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050905/1a195afb/warnings2.bin
> there is nothing wrong with "start" and "end", but in the Ubicom OS > there is a global function called "start()" which gives the warning: > > libspeex/ltp.c:573: warning: declaration of "start" shadows a global declaration > build/include/UbicomSDK.h:5651: warning: shadowed declaration is hereSince it's just a warning and just on one OS, I'll leave it that way.> also this line gives a warning: > > v1=(int)floor(st->vbr_quality); > > libSpeex/libspeex/nb_celp.c: In function `nb_encode': > libSpeex/libspeex/nb_celp.c:465: warning: cast does not match function typeNo clue what this warning is, I'll have to dig a bit.> my CFLAGS include this: >... > perhaps we should add a few of these to libspeex ?I usually compile with several warning flags, but I prefer not to impose any (especially since not everyone uses gcc!).> attached is a new and less intrusive patch, please review.. ;)Much less intrusive indeed. Applied to SVN. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050906/945bc983/attachment.pgp
On Tue, Sep 06, 2005 at 08:54:18AM +1000, Jean-Marc Valin wrote:> I usually compile with several warning flags, but I prefer not to impose > any (especially since not everyone uses gcc!).FWIW, configure is already checking to see whether the compiler is gcc or not. There's an if clause in the configure scripts for ogg, vorbis, theora, and other of our packages that uses this to add for example '-O2 -Wall' to CFLAGS iff $CC is gcc. You can crib from there if you want. -r