[asterisk-dev] [Code Review] 4370: RAII_VAR: nested functions aren't portable. Adapting RAII_VAR to use clang/llvm blocks to get the same/similar functionality. TAKE 2

Diederik de Groot reviewboard at asterisk.org
Sun Feb 22 08:25:02 CST 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4370/#review14521
-----------------------------------------------------------


By the way, these are all the wartning suppressions you need to compile without clang complaining:
-Wno-error=unused-command-line-argument -Wno-implicit-function-declaration -Wno-pointer-bool-conversion -Wno-self-assign -Wno-format -Wno-sizeof-array-argument -Wno-bitfield-constant-conversion -Wno-non-literal-null-conversion -Wno-enum-conversion -Wno-tautological-compare -Wno-parentheses-equality -Wno-gnu-variable-sized-type-not-at-end -Wno-sometimes-uninitialized -Wno-unused-function -Wno-absolute-value -Wno-unused-variable -Wno-unused-value -Wno-unused-const-variable

Using this looks like it defeats the purpose of clang a little bit, but it allows you to focus on one issue at a time.

- Diederik de Groot


On Feb. 21, 2015, 3:35 a.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4370/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2015, 3:35 a.m.)
> 
> 
> Review request for Asterisk Developers and Diederik de Groot.
> 
> 
> Bugs: ASTERISK-20850
>     https://issues.asterisk.org/jira/browse/ASTERISK-20850
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This is a continuation of the patch put up for review on r3488. It addresses the issues found on that review.
> 
> This patch *should* make Asterisk compile under clang. Note that compiling with --enable-dev-mode will cause Asterisk to fail to compile under clang, as it detects a number of warnings that aren't fixed under this patch.
> 
> 
> Diffs
> -----
> 
>   /branches/11/makeopts.in 432053 
>   /branches/11/main/Makefile 432053 
>   /branches/11/include/asterisk/utils.h 432053 
>   /branches/11/include/asterisk/inline_api.h 432053 
>   /branches/11/configure.ac 432053 
>   /branches/11/configure UNKNOWN 
>   /branches/11/Makefile 432053 
> 
> Diff: https://reviewboard.asterisk.org/r/4370/diff/
> 
> 
> Testing
> -------
> 
> * Compiled Asterisk with and without --enable-dev-mode using gcc. Asterisk compiles correctly.
> * Compiled Asterisk without --enable-dev-mode using clang. Asterisk compiles, links, and executes.
> 
> Note that you will need the BlocksRuntime to run Asterisk when it is compiled with clang.
> 
> 
> Thanks,
> 
> Matt Jordan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150222/5179911c/attachment.html>


More information about the asterisk-dev mailing list