[asterisk-dev] [Code Review] 4545: clang compiler warning: -Wunused-command-line-argument
Matt Jordan
reviewboard at asterisk.org
Sat Mar 28 07:04:50 CDT 2015
> On March 27, 2015, 10:31 p.m., Matt Jordan wrote:
> > Why do we want to ignore unused-command-line-argument?
> >
> > I'm not against it, just curious :-)
>
> Diederik de Groot wrote:
> Because it also checks all if the -I parameter is actually used. It will generate a waring for almost every file compiled because of CFLAGS comtains a number of these (for example libxml2) during the processing of the *.i files. I only suppressed this warning when generating these files, so not in general. Just undo the change in Makefile.rules and run in dev-mode to see the 'annoying' effect, for example:
> [CCi] res_pjsip_registrar_expire.i -> res_pjsip_registrar_expire.o
> clang: warning: argument unused during compilation: '-I /data/development/asterisk/asterisk-13-test/include'
> clang: warning: argument unused during compilation: '-I /usr/include/libxml2'
> [CCi] res_pjsip_rfc3326.i -> res_pjsip_rfc3326.o
> clang: warning: argument unused during compilation: '-I /data/development/asterisk/asterisk-13-test/include'
> clang: warning: argument unused during compilation: '-I /usr/include/libxml2'
> clang: warning: argument unused during compilation: '-I /data/development/asterisk/asterisk-13-test/include'
> clang: warning: argument unused during compilation: '-I /usr/include/libxml2'
That makes sense. Thanks for the explanation!
- Matt
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4545/#review14927
-----------------------------------------------------------
On March 27, 2015, 11:04 a.m., Diederik de Groot wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4545/
> -----------------------------------------------------------
>
> (Updated March 27, 2015, 11:04 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-24917
> https://issues.asterisk.org/jira/browse/ASTERISK-24917
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> clang's static analyzer will throw quite a number warnings / errors during compilation, some of which can be very helpfull in finding corner-case bugs. clang compiler warning:-Wunused-command-line-argument
>
>
> Diffs
> -----
>
> /branches/13/Makefile.rules 433444
>
> Diff: https://reviewboard.asterisk.org/r/4545/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Diederik de Groot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150328/4607e58b/attachment.html>
More information about the asterisk-dev
mailing list