From fa092cb70ad3b03cd9f30abc2a1b563673f73c2c Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 25 Dec 2019 19:10:02 -0800 Subject: [PATCH] Cast sz to uint32 to fix compilation on 32 bit `env GOOS=linux GOARCH=arm GOARM=7 go build` no longer fails with overflow. Similar to fb0cdb858c78004b9db8f08e91bb713780b20445. Signed-off-by: Christian Stewart --- value.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/value.go b/value.go index cdf575a29..b1ac371cc 100644 --- a/value.go +++ b/value.go @@ -856,7 +856,7 @@ func (lf *logFile) open(path string, flags uint32) error { return errFile(err, lf.path, "Unable to run file.Stat") } sz := fi.Size() - y.AssertTruef(sz <= math.MaxUint32, "file size: %d greater than %d", sz, math.MaxUint32) + y.AssertTruef(sz <= math.MaxUint32, "file size: %d greater than %d", uint32(sz), uint32(math.MaxUint32)) lf.size = uint32(sz) if sz < vlogHeaderSize { // Every vlog file should have at least vlogHeaderSize. If it is less than vlogHeaderSize