-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning and note in sqlite3-binding.c #803
Comments
I have added
|
A user of a product I am one of the maintainers for complained about the same thing. If you're able I'm interested in your gcc, glibc, and libsqlite3 versions; as it works fine for me. For ref my versions are 9.3, 2.31, and 3.31.1 |
with
build with gcc10
and, build with gcc9
|
Yeah, looks like a gcc 10 issue, 9.3 works fine. It's likely the issue lies with libsqlite3-0 3.31.1 and gcc 10.x. Either a new warning being detected or a problem with 10.x - a lot of issues were resolved in 10.1 marked as regressions introduced between 9.3 and 10.0 (~700) so it could be that. |
looks likely
|
In my case...
ClearLinux version:
GCC Version
|
windows 10 x64 2004 has the same issue |
This is an upstream bug with libsqlite3, not sure where their bug tracker is. |
|
There's a discussion on the SQLite Forum about this issue, including a candidate patch. |
Facing this issue with GoORM, which uses this sqlite3 driver. Any workarounds? Update - adding this env variable fixed it, |
fixed in sqlite3 release 3.33, so go-sqlite3 1.14.1 and later doesn't have this issue P. S. actual go-sqlite3 release is 1.14.7, not 2.0.x |
itz work |
Don't disable these warnings, people. You want to see them. It's like seeing a small fire, closing your eyes and pretending it's not there! |
Hello I am facing the same problem while I try to install gophish. github.com/mattn/go-sqlite3sqlite3-binding.c: In function ‘sqlite3SelectNew’: |
@shalota1 gophish is using v2.0.3 of this library, which is quite old. You will need to ask the maintainer to upgrade to the latest version (v1.14.14) and try that. |
For Windows user go env -w CGO_CFLAGS="-g -O2 -Wno-return-local-addr" |
Attempt fix by mattn/go-sqlite3#803 (comment)
Thanks for pointing it out. Tried |
Thanks - I was able to use your proposed fixes to the go.mod and go.sum files, after doing a |
The version of go-sqlite3 we are currently using (v1.10.0) generates a warning from the C compiler on many go commands (like go build, go test, go vet, etc): # github.com/mattn/go-sqlite3 sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:123303:10: warning: function may return address of local variable [-Wreturn-local-addr] 123303 | return pNew; | ^~~~ sqlite3-binding.c:123263:10: note: declared here 123263 | Select standin; | ^~~~~~~ This change updates go-sqlite3 to the latest version (v1.14.16), which was fixed to avoid this warning; see: mattn/go-sqlite3#803 https://sqlite.org/forum/forumpost/e39020f82d7d510ea4d4a08ae370ca8df061c8b91884c82fda4897853faa2096
Update the go-sqlite3 module to receive that fix for mattn/go-sqlite3#803 which has started occuring since the build machinary was updated.
* chore(deps): update github.com/mattn/go-sqlite3 Update the go-sqlite3 module to receive that fix for mattn/go-sqlite3#803 which has started occuring since the build machinary was updated. * fix: lint * chore: update staticcheck to support newer go versions * fix: staticcheck * fix: go error formatting * chore: increase benchmark timeout
Closing because I believe this issue has long since been fixed in SQLite itself. |
Every time my application starts or tests are run I get the following in my output:
I can get round this by adding
-w
to the CFLAGS option inside sqlite3.goIs there a better way to get rid of this warning and note?
I am running on Fedora 32 x86_64
The text was updated successfully, but these errors were encountered: