From 70dc3de053b6814c023faebbd21525aab575d25d Mon Sep 17 00:00:00 2001 From: Juraj <37395233+JurajX@users.noreply.github.com> Date: Sat, 19 Feb 2022 11:10:45 +0100 Subject: [PATCH] Update format.h To prevent the following compiler message: [...]/include/fmt/format.h:392:20: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion] 392 | unsigned value[size]; | ^~~~ --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 52daed7d..cae24f14 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -389,7 +389,7 @@ template sizeof(From))> inline auto bit_cast(const From& from) -> To { constexpr auto size = static_cast(sizeof(From) / sizeof(unsigned)); struct data_t { - unsigned value[size]; + unsigned value[static_cast(size)]; } data = bit_cast(from); auto result = To(); if (const_check(is_big_endian())) {