diff --git a/source/cell/cell.cpp b/source/cell/cell.cpp index f942afcb..22b10f49 100644 --- a/source/cell/cell.cpp +++ b/source/cell/cell.cpp @@ -376,7 +376,6 @@ void cell::hyperlink(const std::string &url) auto ws = worksheet(); auto &manifest = ws.workbook().manifest(); - bool existing = false; d_->hyperlink_ = detail::hyperlink_impl(); diff --git a/source/detail/serialization/custom_value_traits.hpp b/source/detail/serialization/custom_value_traits.hpp index c829d518..9f33d08d 100644 --- a/source/detail/serialization/custom_value_traits.hpp +++ b/source/detail/serialization/custom_value_traits.hpp @@ -198,7 +198,11 @@ pattern_fill_type from_string(const std::string &string) auto toLower = [](std::string str) { auto bg{ std::begin (str) }; auto en{ std::end (str) }; - std::transform (bg, en, bg, tolower); + std::transform(bg, en, bg, + [](char c) { + // static cast to avoid int -> char narrowing warning + return static_cast(tolower(c)); + }); return str; }; diff --git a/source/detail/serialization/xlsx_consumer.cpp b/source/detail/serialization/xlsx_consumer.cpp index 854263e8..8d6c922f 100644 --- a/source/detail/serialization/xlsx_consumer.cpp +++ b/source/detail/serialization/xlsx_consumer.cpp @@ -246,7 +246,7 @@ cell xlsx_consumer::read_cell() if (parser().attribute_present("s")) { - cell.format(target_.format(std::stoull(parser().attribute("s")))); + cell.format(target_.format(static_cast(std::stoull(parser().attribute("s"))))); } auto has_value = false; @@ -673,7 +673,7 @@ void xlsx_consumer::read_worksheet_sheetdata() if (parser().attribute_present("s")) { - cell.format(target_.format(std::stoull(parser().attribute("s")))); + cell.format(target_.format(static_cast(std::stoull(parser().attribute("s"))))); } auto has_value = false;