aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Martins <[email protected]>2015-09-24 22:37:47 +0100
committerSergio Martins <[email protected]>2015-09-24 22:37:47 +0100
commitc9a87d8cce15bbdf9950bfc48b8eb945edfe0ee1 (patch)
treeaac5c1f134b641c7cece5cfe002847fd8d239589
parentc5dd7484d359a562354a1500309fb450af08ba40 (diff)
Initialize local variable to silence a clang warning
error: ‘depth’ may be used uninitialized in this function All enumerators are handled in the switch, so the initial value isn't important.
-rw-r--r--src/server/handler/list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/handler/list.cpp b/src/server/handler/list.cpp
index 6f78c56..c24a55e 100644
--- a/src/server/handler/list.cpp
+++ b/src/server/handler/list.cpp
@@ -524,7 +524,7 @@ bool List::parseStream()
mCollectionsToIndex = cmd.indexPref();
mIncludeStatistics = cmd.fetchStats();
- int depth;
+ int depth = 0;
switch (cmd.depth()) {
case Protocol::FetchCollectionsCommand::BaseCollection:
depth = 0;