Coverity is a nice static analyzer for C++ projects.
It complains about a few things in google test.Some of them are silly, but a couple of them might be worth looking at.--
File: gtest_main.cc34GTEST_API_ int main(int argc, char **argv) {File: gtest_all.cc548class GTestFlagSaver {549 public:550 // The c'tor.551 GTestFlagSaver() {...567 stream_result_to_ = GTEST_FLAG(stream_result_to);568 throw_on_failure_ = GTEST_FLAG(throw_on_failure);569 }8323 ~CapturedStream() {8324 remove(filename_.c_str());8325 }83268290class CapturedStream {8291 public:8292 // The ctor redirects the stream to a temporary file.8293 CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {8364String CapturedStream::ReadEntireFile(FILE* file) {8365 const size_t file_size = GetFileSize(file);8366 char* const buffer = new char[file_size];8314 char name_template[] = "/tmp/captured_stream.XXXXXX";8315 const int captured_fd = mkstemp(name_template);8316 filename_ = name_template;8317# endif // GTEST_OS_WINDOWS8318 fflush(NULL);8319 dup2(captured_fd, fd_);
---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.