Project

General

Profile

Actions

Bug #1867

closed

mktemp(3) gives bad advice in EXAMPLES section

Added by Yuri Pankov almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
manpage - manual pages
Start date:
2011-12-08
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
mktemp
Gerrit CR:
External Bug:

Description

         #include <stdlib.h>
         ...
         char *template = "/tmp/fileXXXXXX";
         char *ptr;
         ptr = mktemp(template);

This expects strings to be writable, and gcc doesn't agree with it (gcc4 doesn't even have the option anymore).

Actions #1

Updated by Rich Lowe almost 11 years ago

For what it's worth, with all these write-strings bugs, the same is true of newer Sun Studio too.

Actions #2

Updated by Rich Lowe almost 11 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Resolved in r13550 commit:84f53d070f62

Actions

Also available in: Atom PDF