You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/stringer: omit negative bounds check from String for unsigned integers
CL 707396 ("cmd/stringer: fix bounds checking for integer types spanning full
range") introduced a universal lower bounds check for all integers, including
unsigned ints. Unfortunately, performing a <0 bounds check on a uint gets
flagged by static analysis tools like staticcheck.
This commit only emits the bounds check if the type in question is either
signed or has a non-zero minimum value, in which case the bounds check is
necessary for unsigned types as well.
Signed-off-by: Timo Beckers <[email protected]>
0 commit comments