mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Fix high certainty warnings from PVS-studio (#5115)
* 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
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
bbfd12eb11
commit
d44931656a
@@ -44,7 +44,7 @@ int main(int /*argc*/, const char * /*argv*/[]) {
|
||||
flatbuffers::Parser parser1;
|
||||
ok = parser1.Parse(schema_file.c_str(), include_directories);
|
||||
assert(ok);
|
||||
|
||||
|
||||
// inizialize parser by deserializing bfbs schema
|
||||
flatbuffers::Parser parser2;
|
||||
ok = parser2.Deserialize((uint8_t *)bfbs_file.c_str(), bfbs_file.length());
|
||||
@@ -52,6 +52,7 @@ int main(int /*argc*/, const char * /*argv*/[]) {
|
||||
|
||||
// parse json in parser from fbs and bfbs
|
||||
ok = parser1.Parse(json_file.c_str(), include_directories);
|
||||
assert(ok);
|
||||
ok = parser2.Parse(json_file.c_str(), include_directories);
|
||||
assert(ok);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user