storage: Fix float->uint conversions on some compilers.
See https://github.com/prometheus/prometheus/issues/887, which will at least be partially fixed by this. From the spec https://golang.org/ref/spec#Conversions: "In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the result value is implementation-dependent." This ended up setting the converted values to 0 on Debian's Go 1.4.2 compiler, at least on 32-bit Debians.
Showing
想要评论请 注册 或 登录