Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vglavnyy
Copy link
Contributor

The Flatbuffers has checked with the PVS-studio static code analyzer.
This PR fixes several high certainty warnings and introduces FLATBUFFERS_ATTRIBUTE macro definition.

The FLATBUFFERS_ATTRIBUTE temporary disabled until the deprecated Vector::Length() is not resolved.

Unexpected changes: some source lines modified by removing trailing whitespaces on file save.
Need to revert them back?

- Introduced FLATBUFFERS_ATTRIBUTE macro to use [[attribute]] if modern C++ compiler used
Copy link
Collaborator

@aardappel aardappel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This seems to have caught some small but actual bugs, too!

// Clang 3.4 and later implement all of the ISO C++ 2014 standard.
// http://clang.llvm.org/cxx_status.html

// MSVC note: requires `/Zc:__cplusplus` or use _MSVC_LANG
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the consequences of this? I don't think we want to require our users to specify this flag for things to work correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@aardappel
Copy link
Collaborator

Ok, thanks!

@aardappel aardappel merged commit d449316 into google:master Jan 17, 2019
@vglavnyy vglavnyy deleted the PVS_fix_1 branch January 20, 2019 15:40
@aardappel
Copy link
Collaborator

@vglavnyy can you email me?

vglavnyy added a commit to vglavnyy/flatbuffers that referenced this pull request Jan 26, 2019
- GCC: fixed broken `fallthrough` (checked with 7.3 and 8.2)
- Clang: added `fallthrough` support
- Clang: added `-Wimplicit-fallthrough` checking
vglavnyy added a commit to vglavnyy/flatbuffers that referenced this pull request Jan 26, 2019
- GCC: fixed broken `fallthrough` (checked with 7.3 and 8.2)
- Clang: added `fallthrough` support
- Clang: added `-Wimplicit-fallthrough` checking
@vglavnyy vglavnyy mentioned this pull request Jan 26, 2019
aardappel pushed a commit that referenced this pull request Jan 28, 2019
- GCC: fixed broken `fallthrough` (checked with 7.3 and 8.2)
- Clang: added `fallthrough` support
- Clang: added `-Wimplicit-fallthrough` checking
zchee pushed a commit to zchee/flatbuffers that referenced this pull request Feb 14, 2019
* Fix high certainty warnings from PVS-studio

- Introduced FLATBUFFERS_ATTRIBUTE macro to use [[attribute]] if modern C++ compiler used

* Update the note about __cplusplus usage in the MSVC
zchee pushed a commit to zchee/flatbuffers that referenced this pull request Feb 14, 2019
- GCC: fixed broken `fallthrough` (checked with 7.3 and 8.2)
- Clang: added `fallthrough` support
- Clang: added `-Wimplicit-fallthrough` checking
arcadia-devtools pushed a commit to catboost/catboost that referenced this pull request Dec 21, 2020
It was replaced by size() in google/flatbuffers@96592d5d
and deprecated in google/flatbuffers#5115

ref:a1bb5b6bb8e2d38b8332fe3b22818770cb60f9a4
arcadia-devtools pushed a commit to catboost/catboost that referenced this pull request Jan 19, 2022
It was replaced by size() in google/flatbuffers@96592d5d
and deprecated in google/flatbuffers#5115

ref:a1bb5b6bb8e2d38b8332fe3b22818770cb60f9a4
robot-piglet pushed a commit to catboost/catboost that referenced this pull request Jan 15, 2023
It was replaced by size() in google/flatbuffers@96592d5d
and deprecated in google/flatbuffers#5115

ref:a1bb5b6bb8e2d38b8332fe3b22818770cb60f9a4
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