Skip to content
/ server Public

Commit 52b1d7e

Browse files
vaintroubsanja-byelkin
authored andcommitted
libfmt 12.1 - Suppress warning, MSVC-specific
discarding return value of function with [[nodiscard]] attribute for std::isalpha This comes from libfmt templated code
1 parent b241f97 commit 52b1d7e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

cmake/libfmt.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ MACRO(BUNDLE_LIBFMT)
1515
ExternalProject_Add(
1616
libfmt
1717
PREFIX "${dir}"
18-
URL "https://github.com/fmtlib/fmt/releases/download/12.0.0/fmt-12.0.0.zip"
19-
URL_MD5 9bd04e6e8c5b1733e4eefb473604219d
18+
URL "https://github.com/fmtlib/fmt/releases/download/12.1.0/fmt-12.1.0.zip"
19+
URL_MD5 028c6979cad96a4260154f091885171a
2020
INSTALL_COMMAND ""
2121
CONFIGURE_COMMAND ""
2222
BUILD_COMMAND ""

sql/item_strfunc.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,18 @@ String *Item_func_sformat::val_str(String *res)
16221622
/* Create the string output */
16231623
try
16241624
{
1625+
#ifdef _MSC_VER
1626+
/*
1627+
C4834 : "discarding return value of function with [[nodiscard]] attribute"
1628+
in fmt 12.1 template code, for isalpha()
1629+
*/
1630+
#pragma warning(push)
1631+
#pragma warning(disable : 4834)
1632+
#endif
16251633
auto text = fmt::vformat(fmt_locale, fmt_arg->c_ptr_safe(), arg_store);
1634+
#ifdef _MSC_VER
1635+
#pragma warning(pop)
1636+
#endif
16261637
res->length(0);
16271638
res->set_charset(collation.collation);
16281639
res->append(text.c_str(), text.size(), fmt_arg->charset());

0 commit comments

Comments
 (0)