Review Board 1.7.16


Fix deprecation warnings in test_json.c

Review Request #2957 - Created Oct. 23, 2013 and submitted

David Lee
/team/dlee/tempnam-deprecation
Reviewers
asterisk-dev
Asterisk
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).
Tests pass.
Review request changed
Updated (Oct. 25, 2013, 9:22 a.m.)
  • changed from pending to submitted
Committed in revision 401881

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.