Skip to content

Commit

Permalink
Less warn (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Sep 27, 2023
1 parent 47ec26a commit 5ea557e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exp/mdbxpool/txnpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"sync/atomic"

"github.com/torquem-ch/mdbx-go/mdbx"
"github.com/erigontech/mdbx-go/mdbx"
)

// UpdateHandling describes how a TxnPool handles existing mdbx.Readonly
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/torquem-ch/mdbx-go
module github.com/erigontech/mdbx-go

go 1.15
4 changes: 2 additions & 2 deletions mdbx/mdbx.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ details about dealing with such situations.
package mdbx

/*
#cgo !windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fPIC -pthread -Wno-error=attributes -W -Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers
#cgo windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fexceptions -fno-common -W -Wno-deprecated-declarations -Wno-bad-function-cast -Wno-cast-function-type -Wall -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers
#cgo !windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fPIC -pthread -Wno-error=attributes -W -Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-enum-int-mismatch -Wno-strict-prototypes
#cgo windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fexceptions -fno-common -W -Wno-deprecated-declarations -Wno-bad-function-cast -Wno-cast-function-type -Wall -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-enum-int-mismatch -Wno-strict-prototypes
#cgo windows LDFLAGS: -lntdll
#cgo linux LDFLAGS: -lrt
Expand Down
5 changes: 4 additions & 1 deletion mdbx/val.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import "C"
import (
"unsafe"

"github.com/torquem-ch/mdbx-go/mdbx/mdbxarch"
"github.com/erigontech/mdbx-go/mdbx/mdbxarch"
)

// Just for docs:
Expand Down Expand Up @@ -112,5 +112,8 @@ func wrapVal(b []byte) *C.MDBX_val {
}

func castToBytes(val *C.MDBX_val) []byte {
if val.iov_len == 0 {
return []byte{}
}
return (*[valMaxSize]byte)(val.iov_base)[:val.iov_len:val.iov_len]
}

0 comments on commit 5ea557e

Please sign in to comment.