1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

Silence warning: variable 'buffer' set but not used.

llvm-svn: 223389
This commit is contained in:
Yaron Keren 2014-12-04 21:36:38 +00:00
parent cdb73ec2f9
commit 3a3a3de962

View File

@ -35,12 +35,14 @@ std::string StrError() {
#endif // HAVE_ERRNO_H
std::string StrError(int errnum) {
const int MaxErrStrLen = 2000;
char buffer[MaxErrStrLen];
buffer[0] = '\0';
std::string str;
if (errnum == 0)
return str;
#if defined(HAVE_STRERROR_R) || HAVE_DECL_STRERROR_S
const int MaxErrStrLen = 2000;
char buffer[MaxErrStrLen];
buffer[0] = '\0';
#endif
#ifdef HAVE_STRERROR_R
// strerror_r is thread-safe.