build: resolve a -Wunused-function compiler warning (#308)
posixSocket.cpp:67:7: warning: ‘char* {anonymous}::vmime_strerror_r_result(int, char*)’ defined but not used [-Wunused-function] 67 | char* vmime_strerror_r_result(int /* res */, char* buf) { It is to be expected that one of the two r_result functions is going unused, depending on whichever platform we are currently building on.
This commit is contained in:
parent
a2636bd4ae
commit
5f8fa22602
@ -64,14 +64,20 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
char* vmime_strerror_r_result(int /* res */, char* buf) {
|
#ifdef __GNUC__
|
||||||
|
# define GNU_UNUSED [[gnu::unused]]
|
||||||
|
#else
|
||||||
|
# define GNU_UNUSED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
GNU_UNUSED char* vmime_strerror_r_result(int /* res */, char* buf) {
|
||||||
|
|
||||||
// XSI-compliant prototype:
|
// XSI-compliant prototype:
|
||||||
// int strerror_r(int errnum, char *buf, size_t buflen);
|
// int strerror_r(int errnum, char *buf, size_t buflen);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* vmime_strerror_r_result(char* res, char* /* buf */) {
|
GNU_UNUSED char* vmime_strerror_r_result(char* res, char* /* buf */) {
|
||||||
|
|
||||||
// GNU-specific prototype:
|
// GNU-specific prototype:
|
||||||
// char *strerror_r(int errnum, char *buf, size_t buflen);
|
// char *strerror_r(int errnum, char *buf, size_t buflen);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user