Suppress warnings.

This commit is contained in:
Victor Zverovich 2014-06-30 17:40:53 -07:00
parent f4208771a8
commit eb034a0589
2 changed files with 3 additions and 3 deletions

View File

@ -325,7 +325,7 @@ void fmt::internal::FormatWinErrorMessage(
reinterpret_cast<LPWSTR>(system_message.ptr()), 0, 0)) { reinterpret_cast<LPWSTR>(system_message.ptr()), 0, 0)) {
UTF16ToUTF8 utf8_message; UTF16ToUTF8 utf8_message;
if (!utf8_message.Convert(system_message.c_str())) { if (!utf8_message.Convert(system_message.c_str())) {
out << message << ": " << c_str(utf8_message); out << message << ": " << utf8_message;
return; return;
} }
} }
@ -755,7 +755,7 @@ void fmt::internal::PrintfParser<Char>::Format(
++s; ++s;
const Arg &arg = HandleArgIndex(UINT_MAX, error); const Arg &arg = HandleArgIndex(UINT_MAX, error);
if (arg.type <= Arg::LAST_INTEGER_TYPE) if (arg.type <= Arg::LAST_INTEGER_TYPE)
spec.precision_ = GetIntValue(arg); spec.precision_ = static_cast<int>(GetIntValue(arg)); // TODO: check for overflow
else if (!error) else if (!error)
error = "precision is not integer"; error = "precision is not integer";
} }

View File

@ -1512,7 +1512,7 @@ typename fmt::BasicWriter<Char>::CharPtr
unsigned fill_size = width - number_size; unsigned fill_size = width - number_size;
if (align != ALIGN_LEFT) { if (align != ALIGN_LEFT) {
CharPtr p = GrowBuffer(fill_size); CharPtr p = GrowBuffer(fill_size);
std::fill(p, p + fill_size, spec.fill()); std::fill(p, p + fill_size, static_cast<Char>(spec.fill()));
} }
CharPtr result = PrepareBufferForInt(num_digits, subspec, prefix, prefix_size); CharPtr result = PrepareBufferForInt(num_digits, subspec, prefix, prefix_size);
if (align == ALIGN_LEFT) { if (align == ALIGN_LEFT) {