From ed58ff9f81a567f8d79cc94848a9531d04cfae67 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 11 May 2021 16:52:06 +0300 Subject: [PATCH] mdbx++: add `[[maybe_unused]]` to internal functions which depends on platform and compiler features. --- src/mdbx.c++ | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mdbx.c++ b/src/mdbx.c++ index ce7a8ae3..77a7ca8c 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -204,7 +204,7 @@ template struct path_to_pchar { operator const char *() const { return str.c_str(); } }; -template PATH pchar_to_path(const char *c_str) { +template [[maybe_unused]] PATH pchar_to_path(const char *c_str) { return PATH(c_str); } @@ -241,7 +241,8 @@ template <> struct path_to_pchar { operator const char *() const { return str.c_str(); } }; -template <> std::wstring pchar_to_path(const char *c_str) { +template <> +[[maybe_unused]] std::wstring pchar_to_path(const char *c_str) { std::wstring wstr; if (c_str && *c_str) { const int chars = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, c_str,