Commit 07d5a86a authored by Victor Zverovich's avatar Victor Zverovich

Fix warnings

parent ab1474ef
......@@ -1018,10 +1018,12 @@ Char* format_uint(Char* buffer, internal::uintptr_t n, int num_digits,
bool = false) {
auto char_digits = std::numeric_limits<unsigned char>::digits / 4;
int start = (num_digits + char_digits - 1) / char_digits - 1;
if (int start_digits = num_digits % char_digits)
buffer = format_uint<BASE_BITS>(buffer, n.value[start--], start_digits);
if (int start_digits = num_digits % char_digits) {
unsigned value = n.value[start--];
buffer = format_uint<BASE_BITS>(buffer, value, start_digits);
}
for (; start >= 0; --start) {
auto value = n.value[start];
unsigned value = n.value[start];
buffer += char_digits;
auto p = buffer;
for (int i = 0; i < char_digits; ++i) {
......
......@@ -94,7 +94,7 @@ TEST(FPTest, GetCachedPower) {
EXPECT_LE(exp, fp.e);
int dec_exp_step = 8;
EXPECT_LE(fp.e, exp + dec_exp_step * log2(10));
EXPECT_DOUBLE_EQ(pow(10, dec_exp), ldexp(fp.f, fp.e));
EXPECT_DOUBLE_EQ(pow(10, dec_exp), ldexp(static_cast<double>(fp.f), fp.e));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment