Clang warns that FILE* should be declared before it is assigned,
and to not mix declarations and code.
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@817
64e312b2-a51f-0410-8e61-
82d0ca0eb02a
*/
static FILE * open_tmp_file (char ** name)
{
+ FILE *file;
*name = NULL;
+
/* Windows does not like tmpfile(). This is likely because tmpfile()
* call unlink() on the file before returning it, to make sure the
* file is deleted when it is closed. The unlink() call also fails
/* perhaps all we need to do on Windows is set TMPDIR to whatever is
stored in TEMP for tmpfile to work */
/* and finally, the "b" from "w+b" is ignored on OS X, not sure about WIN32 */
- FILE *file = tmpfile ();
+
+ file = tmpfile ();
if (file == NULL)
{
char *tmp = getenv ("TEMP");