fix more compile warnings

N/A

Change-Id: I5b6f9c70aea7d3f3489328834fed323d41106d9f
Signed-off-by: liuhuahang <liuhuahang@zerus.co>
This commit is contained in:
liuhuahang 2014-09-05 14:14:37 +08:00
parent 6d31441181
commit bb6ae0f80c
21 changed files with 61 additions and 0 deletions

View File

@ -9,7 +9,10 @@
#include "db/compaction.h" #include "db/compaction.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <vector> #include <vector>

View File

@ -9,7 +9,10 @@
#include "db/compaction_picker.h" #include "db/compaction_picker.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <limits> #include <limits>
#include "db/filename.h" #include "db/filename.h"

View File

@ -7,7 +7,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#ifndef GFLAGS #ifndef GFLAGS
#include <cstdio> #include <cstdio>

View File

@ -9,7 +9,10 @@
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <algorithm> #include <algorithm>
#include <string> #include <string>

View File

@ -9,7 +9,10 @@
#include "db/db_impl.h" #include "db/db_impl.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <algorithm> #include <algorithm>
#include <climits> #include <climits>

View File

@ -6,7 +6,10 @@
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include "db/filename.h" #include "db/filename.h"
#include <inttypes.h> #include <inttypes.h>

View File

@ -7,7 +7,11 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/internal_stats.h" #include "db/internal_stats.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <vector> #include <vector>
#include "db/column_family.h" #include "db/column_family.h"

View File

@ -31,7 +31,10 @@
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include "db/builder.h" #include "db/builder.h"
#include "db/db_impl.h" #include "db/db_impl.h"

View File

@ -9,7 +9,10 @@
#include "db/version_set.h" #include "db/version_set.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <algorithm> #include <algorithm>
#include <map> #include <map>

View File

@ -10,7 +10,10 @@
#pragma once #pragma once
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <string> #include <string>
#include <map> #include <map>

View File

@ -11,7 +11,10 @@ int main() {
} }
#else #else
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <vector> #include <vector>

View File

@ -6,7 +6,10 @@
// Must not be included from any .h files to avoid polluting the namespace // Must not be included from any .h files to avoid polluting the namespace
// with macros. // with macros.
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <stdio.h> #include <stdio.h>
#include <string> #include <string>

View File

@ -11,7 +11,10 @@ int main() {
} }
#else #else
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <algorithm> #include <algorithm>
#include <gflags/gflags.h> #include <gflags/gflags.h>

View File

@ -9,7 +9,10 @@
#include "util/logging.h" #include "util/logging.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <errno.h> #include <errno.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -10,7 +10,10 @@
#include "rocksdb/options.h" #include "rocksdb/options.h"
#include "rocksdb/immutable_options.h" #include "rocksdb/immutable_options.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <limits> #include <limits>

View File

@ -7,7 +7,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <gflags/gflags.h> #include <gflags/gflags.h>

View File

@ -7,7 +7,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <limits> #include <limits>
#include "util/testharness.h" #include "util/testharness.h"

View File

@ -5,7 +5,10 @@
// //
#include "util/statistics.h" #include "util/statistics.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include "rocksdb/statistics.h" #include "rocksdb/statistics.h"
#include "port/likely.h" #include "port/likely.h"

View File

@ -15,7 +15,9 @@
#include "util/crc32c.h" #include "util/crc32c.h"
#include "rocksdb/transaction_log.h" #include "rocksdb/transaction_log.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <algorithm> #include <algorithm>

View File

@ -6,7 +6,10 @@
#include "rocksdb/utilities/json_document.h" #include "rocksdb/utilities/json_document.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> #include <inttypes.h>
#include <cassert> #include <cassert>
#include <string> #include <string>

View File

@ -7,7 +7,9 @@
#include "utilities/geodb/geodb_impl.h" #include "utilities/geodb/geodb_impl.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#endif
#include <vector> #include <vector>
#include <map> #include <map>