rocmarchive / realcaffe2

The repo is obsolete. Use at your own risk.
https://github.com/pytorch/pytorch
Apache License 2.0
12 stars 2 forks source link

Investigate and fix compiler warning -- warning: the use of `tmpnam' is dangerous, better use `mkstemp' #12

Closed petrex closed 6 years ago

petrex commented 6 years ago

CMakeFiles/text_file_reader_utils_test.dir/operators/text_file_reader_utils_test.cc.o: In function caffe2::TextFileReaderUtilsTest_TokenizeTest_Test::TestBody()': text_file_reader_utils_test.cc:(.text+0x1f78): warning: the use oftmpnam' is dangerous, better use `mkstemp'

petrex commented 6 years ago

This error comes from the upstream files. mkstemp might not work on different platform.

-Wno-deprecated-declarations should be able to suppress the warning here.

petrex commented 6 years ago

104