Skip to content

Commit 4092b7a

Browse files
committed
Merge pull request XRPLF#272 from project-zerus/patch-1
fix more compile warnings
2 parents 6d31441 + bb6ae0f commit 4092b7a

21 files changed

+61
-0
lines changed

db/compaction.cc

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
#include "db/compaction.h"
1111

12+
#ifndef __STDC_FORMAT_MACROS
1213
#define __STDC_FORMAT_MACROS
14+
#endif
15+
1316
#include <inttypes.h>
1417
#include <vector>
1518

db/compaction_picker.cc

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
#include "db/compaction_picker.h"
1111

12+
#ifndef __STDC_FORMAT_MACROS
1213
#define __STDC_FORMAT_MACROS
14+
#endif
15+
1316
#include <inttypes.h>
1417
#include <limits>
1518
#include "db/filename.h"

db/db_bench.cc

+2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// Use of this source code is governed by a BSD-style license that can be
88
// found in the LICENSE file. See the AUTHORS file for names of contributors.
99

10+
#ifndef __STDC_FORMAT_MACROS
1011
#define __STDC_FORMAT_MACROS
12+
#endif
1113

1214
#ifndef GFLAGS
1315
#include <cstdio>

db/db_filesnapshot.cc

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
#ifndef ROCKSDB_LITE
1111

12+
#ifndef __STDC_FORMAT_MACROS
1213
#define __STDC_FORMAT_MACROS
14+
#endif
15+
1316
#include <inttypes.h>
1417
#include <algorithm>
1518
#include <string>

db/db_impl.cc

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
#include "db/db_impl.h"
1111

12+
#ifndef __STDC_FORMAT_MACROS
1213
#define __STDC_FORMAT_MACROS
14+
#endif
15+
1316
#include <inttypes.h>
1417
#include <algorithm>
1518
#include <climits>

db/filename.cc

+3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
77
// Use of this source code is governed by a BSD-style license that can be
88
// found in the LICENSE file. See the AUTHORS file for names of contributors.
9+
#ifndef __STDC_FORMAT_MACROS
910
#define __STDC_FORMAT_MACROS
11+
#endif
12+
1013
#include "db/filename.h"
1114
#include <inttypes.h>
1215

db/internal_stats.cc

+4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
// found in the LICENSE file. See the AUTHORS file for names of contributors.
88

99
#include "db/internal_stats.h"
10+
11+
#ifndef __STDC_FORMAT_MACROS
1012
#define __STDC_FORMAT_MACROS
13+
#endif
14+
1115
#include <inttypes.h>
1216
#include <vector>
1317
#include "db/column_family.h"

db/repair.cc

+3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131

3232
#ifndef ROCKSDB_LITE
3333

34+
#ifndef __STDC_FORMAT_MACROS
3435
#define __STDC_FORMAT_MACROS
36+
#endif
37+
3538
#include <inttypes.h>
3639
#include "db/builder.h"
3740
#include "db/db_impl.h"

db/version_set.cc

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
#include "db/version_set.h"
1111

12+
#ifndef __STDC_FORMAT_MACROS
1213
#define __STDC_FORMAT_MACROS
14+
#endif
15+
1316
#include <inttypes.h>
1417
#include <algorithm>
1518
#include <map>

include/rocksdb/utilities/backupable_db.h

+3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
#pragma once
1111
#ifndef ROCKSDB_LITE
1212

13+
#ifndef __STDC_FORMAT_MACROS
1314
#define __STDC_FORMAT_MACROS
15+
#endif
16+
1417
#include <inttypes.h>
1518
#include <string>
1619
#include <map>

table/cuckoo_table_reader_test.cc

+3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ int main() {
1111
}
1212
#else
1313

14+
#ifndef __STDC_FORMAT_MACROS
1415
#define __STDC_FORMAT_MACROS
16+
#endif
17+
1518
#include <inttypes.h>
1619
#include <gflags/gflags.h>
1720
#include <vector>

util/db_info_dummper.cc

+3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
// Must not be included from any .h files to avoid polluting the namespace
77
// with macros.
88

9+
#ifndef __STDC_FORMAT_MACROS
910
#define __STDC_FORMAT_MACROS
11+
#endif
12+
1013
#include <inttypes.h>
1114
#include <stdio.h>
1215
#include <string>

util/dynamic_bloom_test.cc

+3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ int main() {
1111
}
1212
#else
1313

14+
#ifndef __STDC_FORMAT_MACROS
1415
#define __STDC_FORMAT_MACROS
16+
#endif
17+
1518
#include <inttypes.h>
1619
#include <algorithm>
1720
#include <gflags/gflags.h>

util/logging.cc

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
#include "util/logging.h"
1111

12+
#ifndef __STDC_FORMAT_MACROS
1213
#define __STDC_FORMAT_MACROS
14+
#endif
15+
1316
#include <inttypes.h>
1417
#include <errno.h>
1518
#include <stdarg.h>

util/options.cc

+3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
#include "rocksdb/options.h"
1111
#include "rocksdb/immutable_options.h"
1212

13+
#ifndef __STDC_FORMAT_MACROS
1314
#define __STDC_FORMAT_MACROS
15+
#endif
16+
1417
#include <inttypes.h>
1518
#include <limits>
1619

util/options_test.cc

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
// Use of this source code is governed by a BSD-style license that can be
88
// found in the LICENSE file. See the AUTHORS file for names of contributors.
99

10+
#ifndef __STDC_FORMAT_MACROS
1011
#define __STDC_FORMAT_MACROS
12+
#endif
13+
1114
#include <inttypes.h>
1215
#include <gflags/gflags.h>
1316

util/rate_limiter_test.cc

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
// Use of this source code is governed by a BSD-style license that can be
88
// found in the LICENSE file. See the AUTHORS file for names of contributors.
99

10+
#ifndef __STDC_FORMAT_MACROS
1011
#define __STDC_FORMAT_MACROS
12+
#endif
13+
1114
#include <inttypes.h>
1215
#include <limits>
1316
#include "util/testharness.h"

util/statistics.cc

+3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
//
66
#include "util/statistics.h"
77

8+
#ifndef __STDC_FORMAT_MACROS
89
#define __STDC_FORMAT_MACROS
10+
#endif
11+
912
#include <inttypes.h>
1013
#include "rocksdb/statistics.h"
1114
#include "port/likely.h"

utilities/backupable/backupable_db.cc

+2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
#include "util/crc32c.h"
1616
#include "rocksdb/transaction_log.h"
1717

18+
#ifndef __STDC_FORMAT_MACROS
1819
#define __STDC_FORMAT_MACROS
20+
#endif
1921

2022
#include <inttypes.h>
2123
#include <algorithm>

utilities/document/json_document.cc

+3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
#include "rocksdb/utilities/json_document.h"
88

9+
#ifndef __STDC_FORMAT_MACROS
910
#define __STDC_FORMAT_MACROS
11+
#endif
12+
1013
#include <inttypes.h>
1114
#include <cassert>
1215
#include <string>

utilities/geodb/geodb_impl.cc

+2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
#include "utilities/geodb/geodb_impl.h"
99

10+
#ifndef __STDC_FORMAT_MACROS
1011
#define __STDC_FORMAT_MACROS
12+
#endif
1113

1214
#include <vector>
1315
#include <map>

0 commit comments

Comments
 (0)