From 231d0701aac24d42a02de088bed322396813d948 Mon Sep 17 00:00:00 2001 From: Myles Gray Date: Tue, 23 Jul 2019 17:40:57 +0100 Subject: [PATCH] Changed ttlMaximum to MaxInt32 to allow compilation on 32bit machines In its current state, ttlMaximum causes make to fail build with error: source/source.go:71:39: constant 4294967295 overflows int Because math.MaxUint32 is an untyped integer constant it is converted to type int when used as an interface param, type int is signed, MaxUint32 is larger than MaxInt32 and causes the type int to overflow. Converting ttlMaximum to MaxInt32 stops this overflow. --- source/source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/source.go b/source/source.go index c4e856fb9..83fc84691 100644 --- a/source/source.go +++ b/source/source.go @@ -49,7 +49,7 @@ const ( const ( ttlMinimum = 1 - ttlMaximum = math.MaxUint32 + ttlMaximum = math.MaxInt32 ) // Source defines the interface Endpoint sources should implement.