Current
Current copied to clipboard
Warning: tmpnam is not safe
g++ -std=c++11 -Wall -W -g -x objective-c++ -fobjc-arc -o .noshit/test test.cc -pthread -framework Foundation
In file included from test.cc:29:
./file.h:105:24: 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]
assert(buffer == ::tmpnam(buffer));
^
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE...
^
/usr/include/stdio.h:274:7: note: 'tmpnam' has been explicitly marked deprecated
here
char *tmpnam(char *);
^
In file included from test.cc:32:
In file included from ./../3party/gtest/gtest-main-with-dflags.h:13:
In file included from ./../3party/gtest/gtest.h:6:
In file included from ./../3party/gtest/src/gtest-all.cc:39:
Refs #76
This one is a bit trickier (not only mkstemp
has a very different calling convention, it also opens the file, which is clever, but would require a bit of a redesign on out side).
Could you try changing it into some
TODO(dkorolev): Fix temporary file names generation.
return strings::Printf("/tmp/.noshit-%08x", rand());
for Apple and see whether it gets you past this problem? You'd need to #include "../strings/printf.h"
and #include <cstdlib>
for rand()
.
Just 1.5 years, huh? Hang on :)
Hey, this is fixed, for a long time as of now! Closing.