1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-06-13 19:21:36 +03:00

Don't warn about unused result of mktemp

[BZ #13908]
    mktemp always returns TEMPLATE, the caller should check TEMPLATE[0]
    instead of TEMPLATE, so do not warn about the unused result.
    Fix also the comment for mktemp
This commit is contained in:
Andreas Jaeger
2012-04-05 10:44:08 +02:00
parent 6745ccf5a4
commit 349fa79f55
3 changed files with 11 additions and 4 deletions

View File

@ -603,8 +603,9 @@ extern int clearenv (void) __THROW;
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the file name unique.
Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */
extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur;
Always returns TEMPLATE, it's either a temporary file name or a null
string if it cannot get a unique file name. */
extern char *mktemp (char *__template) __THROW __nonnull ((1));
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \