[asterisk-dev] [Code Review] Convert open coded lists in indications to linked list macros

Kevin Fleming kpfleming at digium.com
Thu Nov 6 11:14:58 CST 2008



> On 2008-11-06 11:04:18, Kevin Fleming wrote:
> > /trunk/res/res_indications.c, line 286
> > <http://reviewboard.digium.com/r/34/diff/1/?file=1226#file1226line286>
> >
> >     While you are in here, move this repeated code for freeing a struct into a static function and use it in all the places that need it, and also drop the pointless casts to 'void *'.
> 
>  wrote:
>     The cast to void * isn't pointless. It clears a compiler warning that occurs on some systems which don't like freeing const pointers. I've had to make similar casts before in work I've done.
> 
>  wrote:
>     I believe the cast is necessary in this case.  The variables are "const char *".  The compiler will complain if you give free() a cosnt *.

Sure enough... that's pretty bogus, but I guess we have to live with it.


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/34/#review82
-----------------------------------------------------------


On 2008-11-06 10:32:45, Sean Bright wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/34/
> -----------------------------------------------------------
> 
> (Updated 2008-11-06 10:32:45)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/indications.h 154965 
>   /trunk/main/indications.c 154965 
>   /trunk/res/res_indications.c 154965 
> 
> Diff: http://reviewboard.digium.com/r/34/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sean
> 
>




More information about the asterisk-dev mailing list