diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-02-23 10:06:32 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-03-14 22:49:25 +0100 |
commit | 8b150a9491490fd4464de0f1228762c921dc7f64 (patch) | |
tree | bdee477c51f737c56c39000293f1cdea9b140a5c /test/test-skeleton.c | |
parent | bad7c039de70b7a00727a6b0bcd30b9f5ba10699 (diff) |
test: silence warning in skeleton
Some tests use fd, rename the one in the skeleton.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'test/test-skeleton.c')
-rw-r--r-- | test/test-skeleton.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test-skeleton.c b/test/test-skeleton.c index 3eab1b841..6d4a8b636 100644 --- a/test/test-skeleton.c +++ b/test/test-skeleton.c @@ -103,7 +103,7 @@ __attribute__ ((unused)) create_temp_file (const char *base, char **filename) { char *fname; - int fd; + int _fd; fname = (char *) malloc (strlen (test_dir) + 1 + strlen (base) + sizeof ("XXXXXX")); @@ -114,8 +114,8 @@ create_temp_file (const char *base, char **filename) } strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX"); - fd = mkstemp (fname); - if (fd == -1) + _fd = mkstemp (fname); + if (_fd == -1) { printf ("cannot open temporary file '%s': %s\n", fname, strerror(errno)); free (fname); @@ -126,7 +126,7 @@ create_temp_file (const char *base, char **filename) if (filename != NULL) *filename = fname; - return fd; + return _fd; } /* Timeout handler. We kill the child and exit with an error. */ |