From 525465a68b388d049728434f32b461797cfd27fa Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 7 Jul 2026 02:17:25 +0200 Subject: [PATCH] Drop two unused gosec nolint directives in chooseSeed The 0x7fffffff mask makes both int32 conversions provably safe, so G115 never fired; nolintlint flags the directives as unused. --- cmd/rogue/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/rogue/main.go b/cmd/rogue/main.go index d165e08..d571e95 100644 --- a/cmd/rogue/main.go +++ b/cmd/rogue/main.go @@ -133,6 +133,6 @@ func chooseSeed(wizard bool) int32 { // The C game computed `lowtime + getpid()` in int; the truncation to // 32 bits is the same wraparound the C int arithmetic performed. - return int32(time.Now().Unix()&0x7fffffff) + //nolint:gosec // G115: deliberate wrap - int32(os.Getpid()&0x7fffffff) //nolint:gosec // G115: deliberate wrap + return int32(time.Now().Unix()&0x7fffffff) + + int32(os.Getpid()&0x7fffffff) }