From 8b4318ad349105e08219e3e8ff5bcdbc7d841332 Mon Sep 17 00:00:00 2001 From: Julien Pivotto <291750+roidelapluie@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:37:09 +0100 Subject: [PATCH] util/runtime: cast Blocks to uint64 to fix type mismatch on different architectures On some GOOS (e.g. dragonfly), statfs.Blocks is int64, which can cause a type mismatch when multiplied with Bsize. Cast both operands to uint64 explicitly. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com> --- util/runtime/statfs_default.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/runtime/statfs_default.go b/util/runtime/statfs_default.go index de65b780f0..535f65a5f0 100644 --- a/util/runtime/statfs_default.go +++ b/util/runtime/statfs_default.go @@ -89,5 +89,6 @@ func FsSize(path string) uint64 { if err != nil { return 0 } - return uint64(fs.Bsize) * fs.Blocks + //nolint:unconvert // Blocks is int64 on some operating systems (e.g. dragonfly). + return uint64(fs.Bsize) * uint64(fs.Blocks) }