Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/15413


Change subject: [tools] fix warning on FlagsCategory::ARRAY_SIZE
......................................................................

[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 a9afbce14454f9b03b9cc5a699a09f4f9935da58.

Change-Id: I629373583ecd010ff6e2e2a1362e5977d3ae191e
---
M src/kudu/tools/ksck-test.cc
M src/kudu/tools/ksck.cc
M src/kudu/tools/ksck.h
3 files changed, 5 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/13/15413/1
--
To view, visit http://gerrit.cloudera.org:8080/15413
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I629373583ecd010ff6e2e2a1362e5977d3ae191e
Gerrit-Change-Number: 15413
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to