Skip to content

Commit

Permalink
Fix compiler warnings and errors in ldb.c
Browse files Browse the repository at this point in the history
Summary:
stdlib.h is needed for exit()
--readhead --> --readahead

Task ID: #

Blame Rev:

Test Plan:
compile

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -
fix compiler warnings & errors

Reviewers: dhruba

Reviewed By: dhruba

CC: heyongqiang

Differential Revision: https://reviews.facebook.net/D5805
  • Loading branch information
mdcallag committed Oct 3, 2012
1 parent a58d48d commit 98804f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/db_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ int main(int argc, char** argv) {
} else if (sscanf(argv[i], "--mmap_read=%d%c", &n, &junk) == 1 &&
(n == 0 || n == 1)) {
useMmapRead = n;
} else if (sscanf(argv[i], "--readhead=%d%c", &n, &junk) == 1 &&
} else if (sscanf(argv[i], "--readahead=%d%c", &n, &junk) == 1 &&
(n == 0 || n == 1)) {
useFsReadAhead = n;
} else if (sscanf(argv[i], "--statistics=%d%c", &n, &junk) == 1 &&
Expand Down
3 changes: 2 additions & 1 deletion tools/ldb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string>
#include <iostream>
#include <sstream>
#include <stdlib.h>

#include "leveldb/db.h"
#include "leveldb/options.h"
Expand Down Expand Up @@ -122,7 +123,7 @@ static void dump_db(
}
}

fprintf(stdout, "Keys in range: %d\n", count);
fprintf(stdout, "Keys in range: %lld\n", (long long) count);

// Clean up
delete iter;
Expand Down

0 comments on commit 98804f9

Please sign in to comment.