Skip to content

Commit

Permalink
Revert "Drop "go vet" from CI due to false positives"
Browse files Browse the repository at this point in the history
Use the workaround suggested in golang/go#58625

This reverts commit 2a46726.
  • Loading branch information
rski committed Apr 13, 2023
1 parent 2a46726 commit 3a393c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ jobs:
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
- name: Run vet
run: go vet ./...
- name: Run tests
run: go test -race ./...
4 changes: 3 additions & 1 deletion truststore_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ func (w windowsRootStore) deleteCertsWithSerial(serial *big.Int) (bool, error) {
deletedAny := false
for {
// Next enum
certPtr, _, err := procCertEnumCertificatesInStore.Call(uintptr(w), uintptr(unsafe.Pointer(cert)))
certUptr, _, err := procCertEnumCertificatesInStore.Call(uintptr(w), uintptr(unsafe.Pointer(cert)))
// Appease vet, see https://github.com/golang/go/issues/58625
certPtr := *(*unsafe.Pointer)(unsafe.Pointer(&certUptr))
if cert = (*syscall.CertContext)(unsafe.Pointer(certPtr)); cert == nil {
if errno, ok := err.(syscall.Errno); ok && errno == 0x80092004 {
break
Expand Down

0 comments on commit 3a393c5

Please sign in to comment.