mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 21:16:56 +00:00
Fix warnings
This commit is contained in:
parent
a5757c86df
commit
90a12b1bb2
@ -994,7 +994,7 @@ TEST(FormatterTest, RuntimePrecision) {
|
||||
FormatError, "number is too big");
|
||||
EXPECT_THROW_MSG(format("{0:.{1}}", 0, -1l),
|
||||
FormatError, "negative precision");
|
||||
if (sizeof(long) > sizeof(int)) {
|
||||
if (fmt::internal::check(sizeof(long) > sizeof(int))) {
|
||||
long value = INT_MAX;
|
||||
EXPECT_THROW_MSG(format("{0:.{1}}", 0, (value + 1)),
|
||||
FormatError, "number is too big");
|
||||
@ -1050,7 +1050,7 @@ void check_unknown_types(
|
||||
char format_str[BUFFER_SIZE], message[BUFFER_SIZE];
|
||||
const char *special = ".0123456789}";
|
||||
for (int i = CHAR_MIN; i <= CHAR_MAX; ++i) {
|
||||
char c = i;
|
||||
char c = static_cast<char>(i);
|
||||
if (std::strchr(types, c) || std::strchr(special, c) || !c) continue;
|
||||
safe_sprintf(format_str, "{0:10%c}", c);
|
||||
if (std::isprint(static_cast<unsigned char>(c)))
|
||||
|
Loading…
Reference in New Issue
Block a user