Change request #1072

Change `tmpnam` to `mkstemp` in `ctselect.cpp`

Added by Deil Christoph over 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:01/09/2014
Priority:LowDue date:
Assigned To:Deil Christoph% Done:

100%

Category:-
Target version:00-07-00
Duration:

Description

libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/gamma/include/gammalib -g -O2 -MT ctselect.lo -MD -MP -MF .deps/ctselect.Tpo -c ctselect.cpp  -fno-common -DPIC -o .libs/ctselect.o
ctselect.cpp:294:41: warning: 'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns
      inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
            std::string filename = std::tmpnam(NULL);
                                        ^
/usr/include/stdio.h:274:7: note: 'tmpnam' declared here
char    *tmpnam(char *);
         ^
ctselect.cpp:629:36: warning: 'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns
      inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
        std::string tmpname = std::tmpnam(NULL);
                                   ^
/usr/include/stdio.h:274:7: note: 'tmpnam' declared here
char    *tmpnam(char *);
         ^
2 warnings generated.

Recurrence

No recurrence.

Associated revisions

Revision 7d91984f
Added by Knödlseder Jürgen over 10 years ago

Use mkstemp() instead of tmpnam().

Fixes #1072.

Before, the following warning was generated:
warning: 'tmpnam’ is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.

History

#1 Updated by Knödlseder Jürgen over 10 years ago

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

Done and pushed into devel.

#2 Updated by Knödlseder Jürgen about 10 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF