This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: BZ #13908 Fix mktemp attribute and comment
On 04/04/2012 06:16 PM, Paul Eggert wrote:
On 04/04/2012 08:58 AM, Carlos O'Donell wrote:
Is there some common idiom that is used by developers which triggers a
warning when it shouldn't?
It's the typical way mktemp should be used. Here's an example, from
<http://stuff.mit.edu/afs/athena/astaff/project/opssrc/cups/foomatic-filters-4.0.3/pdf.c>:
snprintf(filename, PATH_MAX, "%s/foomatic-XXXXXX", temp_dir());
mktemp(filename);
if (!filename[0])
return 0;
Is this with a recent GCC?
It should be with any gcc that supports __wur, no?
Yes, I think so,
Andreas
--
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