From fa29f82548758e89236b45c44ba7aebe2ec907df Mon Sep 17 00:00:00 2001 From: Mark Callaghan Date: Fri, 14 Sep 2012 12:18:36 -0700 Subject: [PATCH] scan a long for FLAGS_cache_size to fix a compiler warning Summary: FLAGS_cache_size is a long, no need to scan %lld into a size_t for it (which generates a compiler warning) Test Plan: run db_bench Reviewers: dhruba, heyongqiang Reviewed By: heyongqiang CC: heyongqiang Differential Revision: https://reviews.facebook.net/D5427 --- db/db_bench.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/db_bench.cc b/db/db_bench.cc index 77410f1fc..423280337 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -1136,7 +1136,6 @@ int main(int argc, char** argv) { for (int i = 1; i < argc; i++) { double d; int n; - size_t nn; long l; char junk; char hdfsname[2048]; @@ -1160,8 +1159,8 @@ int main(int argc, char** argv) { FLAGS_value_size = n; } else if (sscanf(argv[i], "--write_buffer_size=%d%c", &n, &junk) == 1) { FLAGS_write_buffer_size = n; - } else if (sscanf(argv[i], "--cache_size=%lld%c", &nn, &junk) == 1) { - FLAGS_cache_size = nn; + } else if (sscanf(argv[i], "--cache_size=%ld%c", &l, &junk) == 1) { + FLAGS_cache_size = l; } else if (sscanf(argv[i], "--block_size=%d%c", &n, &junk) == 1) { FLAGS_block_size = n; } else if (sscanf(argv[i], "--cache_numshardbits=%d%c", &n, &junk) == 1) {