kudu: fix uninitialized variable usage warning This fixes a trivial warning of a potential usage of an uninitialized variable in release builds. If for some reason Kudu sends us an invalid log severity level, we'll now fall back to INFO instead of reading an uninitialized severity value.
Change-Id: I4f87c39cf9259bec8ba9a84a2543fb1f2e4a3422 Reviewed-on: http://gerrit.cloudera.org:8080/6098 Reviewed-by: Matthew Jacobs <[email protected]> Tested-by: Impala Public Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/441e15a3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/441e15a3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/441e15a3 Branch: refs/heads/master Commit: 441e15a365540d52d022f475a64dc7576ae5df32 Parents: 56e8380 Author: Todd Lipcon <[email protected]> Authored: Mon Feb 20 19:36:13 2017 -0800 Committer: Impala Public Jenkins <[email protected]> Committed: Wed Feb 22 01:21:50 2017 +0000 ---------------------------------------------------------------------- be/src/exec/kudu-util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/441e15a3/be/src/exec/kudu-util.cc ---------------------------------------------------------------------- diff --git a/be/src/exec/kudu-util.cc b/be/src/exec/kudu-util.cc index e81baf5..ef1c74b 100644 --- a/be/src/exec/kudu-util.cc +++ b/be/src/exec/kudu-util.cc @@ -81,7 +81,7 @@ void LogKuduMessage(void* unused, kudu::client::KuduLogSeverity severity, // Note: use raw ints instead of the nice LogSeverity typedef // that can be found in glog/log_severity.h as it has an import // conflict with gutil/logging-inl.h (indirectly imported). - int glog_severity; + int glog_severity = 0; switch (severity) { case kudu::client::SEVERITY_INFO: glog_severity = 0; break;
