This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BZ #13908 Fix mktemp attribute and comment


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]