diff --git a/include/fmt/core.h b/include/fmt/core.h index a73bdbb6..80869b82 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1242,7 +1242,7 @@ template class basic_format_args { internal::type type(int index) const { int shift = index * internal::packed_arg_bits; - int mask = (1 << internal::packed_arg_bits) - 1; + unsigned int mask = (1 << internal::packed_arg_bits) - 1; return static_cast((types_ >> shift) & mask); } diff --git a/include/fmt/format.h b/include/fmt/format.h index c2c31d8d..e57b2b2c 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1572,7 +1572,7 @@ template class basic_writer { basic_string_view s(&sep, sep_size); // Index of a decimal digit with the least significant digit having // index 0. - unsigned digit_index = 0; + int digit_index = 0; std::string::const_iterator group = groups.cbegin(); it = format_decimal( it, abs_value, size,