mattreecebentley / plf_colony

An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures. Provides higher-performance than std:: library containers for high-modification scenarios with unordered data.
https://plflib.org/colony.htm
zlib License
398 stars 33 forks source link

Fix warnings about ignoring fdreopen()'s result. #25

Closed kilobyte closed 5 years ago

kilobyte commented 5 years ago
g++ -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -o testsuite plf_colony_test_suite.cpp
plf_colony_test_suite.cpp: In function 'int main()':
plf_colony_test_suite.cpp:222:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
  freopen("error.log","w", stderr); // For catching assertion failure info when run outside of a command line prompt
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

While such errors are unlikely to actually matter, let's at least silence the warning.

mattreecebentley commented 5 years ago

No, sorry, it's just a test suite, I don't accept patches like this.