[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM
From: |
Eric Blake |
Subject: |
Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM |
Date: |
Thu, 5 Nov 2009 15:19:10 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
> Aargh. I just noticed that what I pushed still has a bug:
>
> $ src/mktemp -u XXXXXXXXXXXXXXXXX.pdf
> XXXXXXXXXXXXXpiYD.pdf
>
> Rather than replacing all the X, it is only replacing the number of X in
> the suffix. And the testsuite didn't catch it :(
But --enable-gcc-warnings did.
| cc1: warnings being treated as errors
| mktemp.c: In function ‘mkstemp_len’:
| mktemp.c:118: error: unused parameter ‘x_len’ [-Wunused-parameter]
| mktemp.c: In function ‘mkdtemp_len’:
| mktemp.c:125: error: unused parameter ‘x_len’ [-Wunused-parameter]
Here's what I'll push that once I get a chance to turn this into a proper patch.
diff --git i/src/mktemp.c w/src/mktemp.c
index ac35026..f60e824 100644
--- i/src/mktemp.c
+++ w/src/mktemp.c
@@ -118,14 +118,14 @@ static int
mkstemp_len (char *tmpl, size_t suff_len, size_t x_len, bool dry_run)
{
return gen_tempname_len (tmpl, suff_len, 0, dry_run ? GT_NOCREATE : GT_FILE,
- suff_len);
+ x_len);
}
static int
mkdtemp_len (char *tmpl, size_t suff_len, size_t x_len, bool dry_run)
{
return gen_tempname_len (tmpl, suff_len, 0, dry_run ? GT_NOCREATE : GT_DIR,
- suff_len);
+ x_len);
}
int
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, (continued)
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Jim Meyering, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Eric Blake, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Jim Meyering, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Jim Meyering, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Jim Meyering, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Eric Blake, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Eric Blake, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Jim Meyering, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Jim Meyering, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM, Eric Blake, 2009/11/05
- Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM,
Eric Blake <=
- Re: temp file suffixes: mktemp DWIM, Pádraig Brady, 2009/11/04
Re: temp file suffixes: mktemp DWIM, Eric Blake, 2009/11/03