From bb6ae0f80c9546e5eafec0f3aac2695aa8ef56df Mon Sep 17 00:00:00 2001 From: liuhuahang Date: Fri, 5 Sep 2014 14:14:37 +0800 Subject: [PATCH] fix more compile warnings N/A Change-Id: I5b6f9c70aea7d3f3489328834fed323d41106d9f Signed-off-by: liuhuahang --- db/compaction.cc | 3 +++ db/compaction_picker.cc | 3 +++ db/db_bench.cc | 2 ++ db/db_filesnapshot.cc | 3 +++ db/db_impl.cc | 3 +++ db/filename.cc | 3 +++ db/internal_stats.cc | 4 ++++ db/repair.cc | 3 +++ db/version_set.cc | 3 +++ include/rocksdb/utilities/backupable_db.h | 3 +++ table/cuckoo_table_reader_test.cc | 3 +++ util/db_info_dummper.cc | 3 +++ util/dynamic_bloom_test.cc | 3 +++ util/logging.cc | 3 +++ util/options.cc | 3 +++ util/options_test.cc | 3 +++ util/rate_limiter_test.cc | 3 +++ util/statistics.cc | 3 +++ utilities/backupable/backupable_db.cc | 2 ++ utilities/document/json_document.cc | 3 +++ utilities/geodb/geodb_impl.cc | 2 ++ 21 files changed, 61 insertions(+) diff --git a/db/compaction.cc b/db/compaction.cc index 0bffa0162..cf0b682aa 100644 --- a/db/compaction.cc +++ b/db/compaction.cc @@ -9,7 +9,10 @@ #include "db/compaction.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include diff --git a/db/compaction_picker.cc b/db/compaction_picker.cc index e05d07776..6e9a46ed4 100644 --- a/db/compaction_picker.cc +++ b/db/compaction_picker.cc @@ -9,7 +9,10 @@ #include "db/compaction_picker.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include "db/filename.h" diff --git a/db/db_bench.cc b/db/db_bench.cc index 2f88e81ff..bd4389b49 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -7,7 +7,9 @@ // 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. +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #ifndef GFLAGS #include diff --git a/db/db_filesnapshot.cc b/db/db_filesnapshot.cc index 4185a40ca..aa1408f38 100644 --- a/db/db_filesnapshot.cc +++ b/db/db_filesnapshot.cc @@ -9,7 +9,10 @@ #ifndef ROCKSDB_LITE +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/db/db_impl.cc b/db/db_impl.cc index 4e3816d64..f18304407 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -9,7 +9,10 @@ #include "db/db_impl.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/db/filename.cc b/db/filename.cc index 42c7efb78..a8f685296 100644 --- a/db/filename.cc +++ b/db/filename.cc @@ -6,7 +6,10 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // 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. +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include "db/filename.h" #include diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 3142d13b3..c9f9306e2 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -7,7 +7,11 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #include "db/internal_stats.h" + +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include "db/column_family.h" diff --git a/db/repair.cc b/db/repair.cc index dfe79fb23..ea6cdd642 100644 --- a/db/repair.cc +++ b/db/repair.cc @@ -31,7 +31,10 @@ #ifndef ROCKSDB_LITE +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include "db/builder.h" #include "db/db_impl.h" diff --git a/db/version_set.cc b/db/version_set.cc index eca56ba2a..82183a982 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -9,7 +9,10 @@ #include "db/version_set.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/include/rocksdb/utilities/backupable_db.h b/include/rocksdb/utilities/backupable_db.h index 78365769d..bf3f919ae 100644 --- a/include/rocksdb/utilities/backupable_db.h +++ b/include/rocksdb/utilities/backupable_db.h @@ -10,7 +10,10 @@ #pragma once #ifndef ROCKSDB_LITE +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/table/cuckoo_table_reader_test.cc b/table/cuckoo_table_reader_test.cc index 53946e71b..3138fb9ef 100644 --- a/table/cuckoo_table_reader_test.cc +++ b/table/cuckoo_table_reader_test.cc @@ -11,7 +11,10 @@ int main() { } #else +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/util/db_info_dummper.cc b/util/db_info_dummper.cc index d5dd97ad2..2e0d34481 100644 --- a/util/db_info_dummper.cc +++ b/util/db_info_dummper.cc @@ -6,7 +6,10 @@ // Must not be included from any .h files to avoid polluting the namespace // with macros. +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/util/dynamic_bloom_test.cc b/util/dynamic_bloom_test.cc index 3e55488f2..6d228e81d 100644 --- a/util/dynamic_bloom_test.cc +++ b/util/dynamic_bloom_test.cc @@ -11,7 +11,10 @@ int main() { } #else +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/util/logging.cc b/util/logging.cc index 1b5549d73..4dfb9a449 100644 --- a/util/logging.cc +++ b/util/logging.cc @@ -9,7 +9,10 @@ #include "util/logging.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/util/options.cc b/util/options.cc index fc9285442..371ecda78 100644 --- a/util/options.cc +++ b/util/options.cc @@ -10,7 +10,10 @@ #include "rocksdb/options.h" #include "rocksdb/immutable_options.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include diff --git a/util/options_test.cc b/util/options_test.cc index be07a83f5..afe3795f9 100644 --- a/util/options_test.cc +++ b/util/options_test.cc @@ -7,7 +7,10 @@ // 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. +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include diff --git a/util/rate_limiter_test.cc b/util/rate_limiter_test.cc index 1b72e4ed0..9d6cfb7e6 100644 --- a/util/rate_limiter_test.cc +++ b/util/rate_limiter_test.cc @@ -7,7 +7,10 @@ // 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. +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include "util/testharness.h" diff --git a/util/statistics.cc b/util/statistics.cc index 24957c9b6..9d828a6fe 100644 --- a/util/statistics.cc +++ b/util/statistics.cc @@ -5,7 +5,10 @@ // #include "util/statistics.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include "rocksdb/statistics.h" #include "port/likely.h" diff --git a/utilities/backupable/backupable_db.cc b/utilities/backupable/backupable_db.cc index 436f4c2d6..4d1a9b76b 100644 --- a/utilities/backupable/backupable_db.cc +++ b/utilities/backupable/backupable_db.cc @@ -15,7 +15,9 @@ #include "util/crc32c.h" #include "rocksdb/transaction_log.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include diff --git a/utilities/document/json_document.cc b/utilities/document/json_document.cc index 641f4ee09..4368b759d 100644 --- a/utilities/document/json_document.cc +++ b/utilities/document/json_document.cc @@ -6,7 +6,10 @@ #include "rocksdb/utilities/json_document.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif + #include #include #include diff --git a/utilities/geodb/geodb_impl.cc b/utilities/geodb/geodb_impl.cc index f63c91c3e..6c13fd691 100644 --- a/utilities/geodb/geodb_impl.cc +++ b/utilities/geodb/geodb_impl.cc @@ -7,7 +7,9 @@ #include "utilities/geodb/geodb_impl.h" +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #include