mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Suppress a warning about unused strerror_r.
This commit is contained in:
parent
8725d07d8b
commit
63f6c10449
@ -207,7 +207,10 @@ int safe_strerror(
|
||||
StrError(int error_code, char *&buffer, std::size_t buffer_size)
|
||||
: error_code_(error_code), buffer_(buffer), buffer_size_(buffer_size) {}
|
||||
|
||||
int run() { return handle(strerror_r(error_code_, buffer_, buffer_size_)); }
|
||||
int run() {
|
||||
strerror_r(0, 0, ""); // Suppress a warning about unused strerror_r.
|
||||
return handle(strerror_r(error_code_, buffer_, buffer_size_));
|
||||
}
|
||||
};
|
||||
return StrError(error_code, buffer, buffer_size).run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user