forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tools] fix warning on FlagsCategory::ARRAY_SIZE
Introducing an extra utility element ARRAY_SIZE into the FlagsCategory enumeration lead to compilation warning about unhandled enumeration value in switch statements: Building CXX object src/kudu/tools/CMakeFiles/ksck.dir/ksck.cc.o ../../src/kudu/tools/ksck.cc: In function ‘const char* kudu::tools::FlagsCategoryToString(kudu::tools::FlagsCategory)’: ../../src/kudu/tools/ksck.cc:216:10: warning: enumeration value ‘ARRAY_SIZE’ not handled in switch [-Wswitch] I think using FlagsCategory::MAX+1 instead of FlagsCategory::ARRAY_SIZE is better than adding some special handling for ephemeral utility value in switch statements. This is a follow-up to a9afbce. Change-Id: I629373583ecd010ff6e2e2a1362e5977d3ae191e Reviewed-on: http://gerrit.cloudera.org:8080/15413 Reviewed-by: Andrew Wong <[email protected]> Tested-by: Kudu Jenkins
- Loading branch information
1 parent
2649865
commit b2daddd
Showing
3 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters