From 8cbfb6e727485a9127d56b0bcfd6a6e1cfa3911c Mon Sep 17 00:00:00 2001 From: medithe <40990424+medithe@users.noreply.github.com> Date: Tue, 11 Sep 2018 15:14:39 +0200 Subject: [PATCH] Get rid of conversion warning in gcc-4.8 (#854) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Get rid of conversion warning in gcc-4.8 Get rid of the following warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Werror=conversion] --- include/fmt/format-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 38d561e1..019282fb 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -371,7 +371,7 @@ class fp { explicit fp(Double d) { // Assume double is in the format [sign][exponent][significand]. typedef std::numeric_limits limits; - const int double_size = sizeof(Double) * char_size; + const int double_size = static_cast(sizeof(Double) * char_size); const int exponent_size = double_size - double_significand_size - 1; // -1 for sign const uint64_t significand_mask = implicit_bit - 1;