Skip to content

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jan 25, 2021

With clang 12, build failures appear due to an implicit fallthrough:

src/bson-encode.c:314:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
                case IS_OBJECT: {
                ^
src/bson-encode.c:314:3: note: insert '__attribute__((fallthrough));' to silence this warning
                case IS_OBJECT: {
                ^
                __attribute__((fallthrough)); 
src/bson-encode.c:314:3: note: insert 'break;' to avoid fall-through
                case IS_OBJECT: {
                ^
                break; 
1 error generated.

@alcaeus alcaeus requested a review from jmikola January 25, 2021 16:04
@alcaeus alcaeus self-assigned this Jan 25, 2021
@alcaeus alcaeus merged commit 35e5b6c into mongodb:v1.9 Jan 26, 2021
@alcaeus alcaeus deleted the fix-clang-12-build branch January 26, 2021 06:55
alcaeus added a commit that referenced this pull request Jan 26, 2021
* v1.9:
  Fix build failures with clang 12 (#1193)
  PHPC-1748 Fix wrong return value of Cursor::key when iterator is not valid (#1192)
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 this pull request may close these issues.

2 participants