This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
BZ #13908 Fix mktemp attribute and comment
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 4 Apr 2012 10:41:55 +0200
- Subject: BZ #13908 Fix mktemp attribute and comment
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
Ok to commit?
Andreas
2012-04-04 Andreas Jaeger <aj@suse.de>
[BZ #13908]
* stdlib/stdlib.h: Don't warn about unused result of mktemp, fix
comment.
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
---
stdlib/stdlib.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index d3bd492..0cc81ee 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -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;
+ Returns always 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 \
--
1.7.7
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126