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:
parent
cdb73ec2f9
commit
3a3a3de962
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user