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

svnbot reviewboard at asterisk.org
Fri Oct 25 08:48:44 CDT 2013


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

(Updated Oct. 25, 2013, 8:48 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 401872


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/20131025/3df1c987/attachment.html>


More information about the asterisk-dev mailing list