diff options
author | Bookatz <bookatz@google.com> | 2018-11-14 13:14:45 -0800 |
---|---|---|
committer | Bookatz <bookatz@google.com> | 2018-11-14 13:35:30 -0800 |
commit | da9b8d0ad19f439bc4c77ada798edd02a92de85e (patch) | |
tree | db3d8e762f3dc1010c01b97200cec7c6ea683b4d /tools/incident_section_gen/main.cpp | |
parent | 10113a7c36838cb7da6b36e7f4800d6cfae6178d (diff) |
Incidentd: Fix switch break warnings
A few switches didn't have explicit breaks in them, which was causing
warnings. They were all benign, as the logic did not necessitate a
break. But this is will stop the warnings and perhaps prevent future
bugs.
Change-Id: Idb293a4896f4df8d3f11d748e0e716efc26bbd6a
Fixes: 119047812
Test: N/A
Diffstat (limited to 'tools/incident_section_gen/main.cpp')
-rw-r--r-- | tools/incident_section_gen/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp index 0cf1046ef376..3f42275b4e1b 100644 --- a/tools/incident_section_gen/main.cpp +++ b/tools/incident_section_gen/main.cpp @@ -21,6 +21,10 @@ #include <sstream> #include <string> +#ifndef FALLTHROUGH_INTENDED +#define FALLTHROUGH_INTENDED [[fallthrough]] +#endif + using namespace android; using namespace android::os; using namespace google::protobuf; @@ -355,6 +359,7 @@ static bool generatePrivacyFlags(const Descriptor* descriptor, const Destination printPrivacy(fieldName, field, "NULL", fieldDest, fieldName + "_patterns"); break; } + FALLTHROUGH_INTENDED; // else treat string field as primitive field and goes to default default: if (!hasDefaultFlags[i]) printPrivacy(fieldName, field, "NULL", fieldDest, "NULL"); |