[asterisk-dev] [Code Review] 2957: Fix deprecation warnings in test_json.c

Mark Michelson reviewboard at asterisk.org
Thu Oct 24 09:46:03 CDT 2013


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

Ship it!


Ship It!

- Mark Michelson


On Oct. 24, 2013, 3:05 a.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2957/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2013, 3:05 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> After a series of upgrades over recent weeks, I've discovered that
> test_json.c won't compile in dev mode any more for me.
> 
> One of gcc-4.8.2, OS X Mavericks or Xcode 5 has decided to deprecate
> tempnam. Which, in general, is a good thing. But for test code that just
> needs a temporary file, it's just annoying.
> 
> This patch replaces usage of tempname with mkstemp, avoiding the
> deprecation warning. It also removes the temporary files when the test
> is complete, which apparently we weren't doing before (oops).
> 
> 
> Diffs
> -----
> 
>   /branches/12/tests/test_json.c 401700 
> 
> Diff: https://reviewboard.asterisk.org/r/2957/diff/
> 
> 
> Testing
> -------
> 
> Tests pass.
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131024/899df4da/attachment.html>


More information about the asterisk-dev mailing list