summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-04-03 15:59:13 -0400
committerAaron <aaron@10gen.com>2009-04-03 15:59:13 -0400
commitfd780da9b6ca5185fcbcd4dd484446883978220f (patch)
treedfafbb23a30a4ecb2b7d70f02a8a136e2ce099f5
parent6a8c1177555606f66861a9847d53abd0713385c7 (diff)
downloadmongo-fd780da9b6ca5185fcbcd4dd484446883978220f.tar.gz
fix warnings
-rw-r--r--db/query.cpp5
-rw-r--r--tools/sniffer.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/db/query.cpp b/db/query.cpp
index 77428fb5013..ff33e037dae 100644
--- a/db/query.cpp
+++ b/db/query.cpp
@@ -1229,10 +1229,11 @@ namespace mongo {
cc->filter = filter;
cc->originalMessage = m;
cc->updateLocation();
- if ( !cc->c->ok() && cc->c->tailable() )
+ if ( !cc->c->ok() && cc->c->tailable() ) {
DEV out() << " query has no more but tailable, cursorid: " << cursorid << endl;
- else
+ } else {
DEV out() << " query has more, cursorid: " << cursorid << endl;
+ }
}
if ( explain ) {
BSONObjBuilder builder;
diff --git a/tools/sniffer.cpp b/tools/sniffer.cpp
index 93339cedf57..04672cd6f00 100644
--- a/tools/sniffer.cpp
+++ b/tools/sniffer.cpp
@@ -343,7 +343,7 @@ int main(int argc, char **argv){
bool source = false;
bool replay = false;
- const char *file;
+ const char *file = 0;
vector< const char * > args;
for( int i = 1; i < argc; ++i )