Fix conversion warnings (#989)

* Fix sign conversion warnings

* Ignore unused local typedefs

* Remove cast reported as useless on GCC

* Remove warning on unused variable

* Enable conversion warning checking for pedantic build

* Fix sign-conversion warnings in headers
This commit is contained in:
Sign Bit
2018-12-20 09:24:19 -05:00
committed by Victor Zverovich
parent 77a7244804
commit 0bbdca5b8b
9 changed files with 71 additions and 69 deletions

View File

@@ -492,7 +492,7 @@ class QString {
inline fmt::basic_string_view<wchar_t> to_string_view(
const QString &s) FMT_NOEXCEPT {
return {reinterpret_cast<const wchar_t *>(s.utf16()),
return {s.utf16(),
static_cast<std::size_t>(s.size())};
}
}

View File

@@ -1917,6 +1917,7 @@ TEST(FormatTest, Enum) {
TEST(FormatTest, EnumFormatterUnambiguous) {
fmt::formatter<TestEnum> f;
ASSERT_GE(sizeof(f), 0); // use f to avoid compiler warning
}
#if FMT_HAS_FEATURE(cxx_strong_enums)