mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Tweak fallthrough comments to get recognized by gcc7 (#4298)
GCC gained a new warning, -Wimplicit-fallthrough, which warns about implicitly falling through a case statement. The regular expressions used at the default level (-Wimplicit-fallthrough=3) don't match with a colon at the end. The comment also needs to be followed (after optional whitespace and other comments) by a 'case' or 'default' keyword, i.e. it will not be recognized with a '}' between the comment and the keyword.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
8f8a27d6e5
commit
bbb72f0b73
@@ -420,8 +420,8 @@ Offset<const Table *> CopyTable(FlatBufferBuilder &fbb,
|
||||
offset = fbb.CreateVector(elements).o;
|
||||
break;
|
||||
}
|
||||
// FALL-THRU:
|
||||
}
|
||||
// FALL-THRU
|
||||
default: { // Scalars and structs.
|
||||
auto element_size = GetTypeSize(element_base_type);
|
||||
if (elemobjectdef && elemobjectdef->is_struct())
|
||||
@@ -458,8 +458,8 @@ Offset<const Table *> CopyTable(FlatBufferBuilder &fbb,
|
||||
subobjectdef.bytesize());
|
||||
break;
|
||||
}
|
||||
// else: FALL-THRU:
|
||||
}
|
||||
// ELSE FALL-THRU
|
||||
case reflection::Union:
|
||||
case reflection::String:
|
||||
case reflection::Vector:
|
||||
|
||||
Reference in New Issue
Block a user