Fixed compile warnings in posix_logger.h and coding.h

Summary:
Fixed the following compile warnings:

/Users/yhchiang/rocksdb/util/posix_logger.h:32:11: error: unused variable 'kDebugLogChunkSize' [-Werror,-Wunused-const-variable]
const int kDebugLogChunkSize = 128 * 1024;
          ^
/Users/yhchiang/rocksdb/util/coding.h:24:20: error: unused variable 'kMaxVarint32Length' [-Werror,-Wunused-const-variable]
const unsigned int kMaxVarint32Length = 5;
                   ^
2 errors generated.

Test Plan: make clean rocksdb

Reviewers: igor, sdong, anthony, IslamAbdelRahman, rven, kradhakrishnan, adamretter

Reviewed By: adamretter

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D56223
This commit is contained in:
Yueh-Hsuan Chiang 2016-03-31 16:01:47 -07:00
parent 51c9464dfc
commit a558830f8f
3 changed files with 3 additions and 6 deletions

View File

@ -23,8 +23,6 @@ namespace rocksdb {
class Env;
const int kDebugLogChunkSize = 128 * 1024;
class WinLogger : public rocksdb::Logger {
public:
WinLogger(uint64_t (*gettid)(), Env* env, HANDLE file,

View File

@ -23,8 +23,7 @@
namespace rocksdb {
// The maximum length of a varint in bytes for 32 and 64 bits respectively.
const unsigned int kMaxVarint32Length = 5;
// The maximum length of a varint in bytes for 64-bit.
const unsigned int kMaxVarint64Length = 10;
// Standard Put... routines append to a string

View File

@ -30,8 +30,6 @@
namespace rocksdb {
const int kDebugLogChunkSize = 128 * 1024;
class PosixLogger : public Logger {
private:
FILE* file_;
@ -129,6 +127,8 @@ class PosixLogger : public Logger {
const size_t write_size = p - base;
#ifdef ROCKSDB_FALLOCATE_PRESENT
const int kDebugLogChunkSize = 128 * 1024;
// If this write would cross a boundary of kDebugLogChunkSize
// space, pre-allocate more space to avoid overly large
// allocations from filesystem allocsize options.