From 3f1f263217113d3eef5a7834c8c3d119c4611618 Mon Sep 17 00:00:00 2001 From: Tobi823 Date: Tue, 18 Jan 2022 12:40:02 +0100 Subject: [PATCH] - try fixing the warning "chrono.h:1217:37: warning: conversion from 'std::make_unsigned::type' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion]" by casting int to size_t (occurs when cross-compiling to Raspberry Pi ARMv7) --- include/fmt/chrono.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index df4b81ae..359d1362 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1214,7 +1214,7 @@ template class tm_writer { char buf[10]; size_t offset = 0; if (year >= 0 && year < 10000) { - copy2(buf, digits2(to_unsigned(year / 100))); + copy2(buf, digits2(static_cast(to_unsigned(year / 100)))); } else { offset = 4; write_year_extended(year);