Skip to content

Commit

Permalink
Ignore unsafe pointer conversion warning
Browse files Browse the repository at this point in the history
This is a temporary fix for elastic#138
to ignore the warning.
  • Loading branch information
andrewkroh committed Jul 14, 2020
1 parent 68c4b9e commit f95e3ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ build_script:
test_script:
# Unit tests
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
- go test -v ./...
- go test -gcflags=-d=checkptr -v ./...
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
- ps: Add-AppveyorTest "Running Examples" -Outcome Running
- .\examples\df\df.exe
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ script:
- gofmt -l . | read && echo "Code differs from gofmt's style. Run 'gofmt -w .'" 1>&2 && exit 1 || true
- go vet
- go build
- go test -v ./...
- go test -gcflags=-d=checkptr -v ./...
- for i in $(ls examples); do go build -o examples/$i/$i ./examples/$i; ./examples/$i/$i; done
2 changes: 2 additions & 0 deletions sigar_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"unsafe"
)

// TODO (2020-07-14): Fix the unsafe pointer conversion. https://github.com/elastic/gosigar/issues/138
//go:nocheckptr
func bytePtrToString(ptr *int8) string {
bytes := (*[10000]byte)(unsafe.Pointer(ptr))

Expand Down

0 comments on commit f95e3ff

Please sign in to comment.