Skip to content
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

build warning on gcc 7.3.0 #126

Open
yerden opened this issue Nov 23, 2018 · 4 comments · May be fixed by #132
Open

build warning on gcc 7.3.0 #126

yerden opened this issue Nov 23, 2018 · 4 comments · May be fixed by #132

Comments

@yerden
Copy link

yerden commented Nov 23, 2018

Hi, I have ubuntu bionic, gcc 7.3.0-16ubuntu3. I have implicit fallthrough warning:

$  go get github.com/bmatsuo/lmdb-go/lmdb
# github.com/bmatsuo/lmdb-go/lmdb
mdb.c: In function ‘mdb_cursor_put’:
mdb.c:6725:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
      if (SIZELEFT(fp) < offset) {
         ^
mdb.c:6730:5: note: here
     case MDB_CURRENT:
     ^~~~

That could be worked around with some gcc-specific attributes but I think it's worth disabling this warning altogether.

@yerden yerden changed the title build error on gcc 7.3.0 build warning on gcc 7.3.0 Nov 23, 2018
@kevburnsjr
Copy link

This was fixed upstream.
Probably better to copy in the updated lib rather than altering the source.

@kevburnsjr kevburnsjr linked a pull request Feb 8, 2020 that will close this issue
@yerden
Copy link
Author

yerden commented Feb 22, 2020

This was fixed upstream.
Probably better to copy in the updated lib rather than altering the source.

No luck merging this anyway for quite a long time now. Let's hope the maintainer will return and make the choice. :)

@whitehse
Copy link

whitehse commented Mar 4, 2020

I also ran into this issue on Debian. I did the following to get a successful build:

cd ~/go/src/github.com/
go get github.com/kevburnsjr/lmdb-go/lmdb
rm -rf bmatsuo/
mv kevburnsjr/ bmatsuo

@kevburnsjr I appreciate your patches

@elliotmtx
Copy link

elliotmtx commented Nov 9, 2020

Hi I am facing this issue now, same issue is not observed any of my colleagues, not sure why.
Any one can please help me.

DEBUG: Executing shell function do_compile_ptest_base

github.com/mendersoftware/mender/vendor/github.com/bmatsuo/lmdb-go/lmdb

mdb.c: In function 'mdb_cursor_put':
mdb.c:6535:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (SIZELEFT(fp) < offset) {
^
mdb.c:6540:5: note: here
case MDB_CURRENT:
^~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants