Skip to content

Commit

Permalink
Merge pull request numenta#40 from breznak/fix_ubuntu_netbeans_cpp
Browse files Browse the repository at this point in the history
workaround strerror_r ignoring return value warning
  • Loading branch information
scottpurdy committed Mar 17, 2014
2 parents 3ecc06a + ecd6ba7 commit 7d1271c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion os/FStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ void *ZLib::fopen(const std::string &filename, const std::string &mode,
case Z_VERSION_ERROR: message = "Zlib version error."; break;
default:
char errbuf[256];
::strerror_r(error, errbuf, 256);
char* retval = ::strerror_r(error, errbuf, 256);
if(retval != NULL) {
//empty code to silence -Werror=unused-variable warning
}
message = errbuf;
break;
}
Expand Down

0 comments on commit 7d1271c

Please sign in to comment.