From: Nick Mathewson Date: Fri, 13 Feb 2009 13:43:35 +0000 (+0000) Subject: Make tmpfile code compile without warnings X-Git-Tag: release-2.0.1-alpha~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73094d595208ff45ec44d8d399b1811472156b8f;p=libevent Make tmpfile code compile without warnings svn:r1123 --- diff --git a/test/regress_main.c b/test/regress_main.c index e7939bd9..ad337427 100644 --- a/test/regress_main.c +++ b/test/regress_main.c @@ -95,8 +95,9 @@ regress_make_tmpfile(const void *data, size_t datalen) { #ifndef WIN32 char tmpfilename[32]; + int fd; strcpy(tmpfilename, "/tmp/eventtmp.XXXX"); - int fd = mkstemp(tmpfilename); + fd = mkstemp(tmpfilename); if (fd == -1) return (-1); if (write(fd, data, datalen) != datalen) {