Skip to content

Commit

Permalink
fix more compile warnings
Browse files Browse the repository at this point in the history
N/A

Change-Id: I5b6f9c70aea7d3f3489328834fed323d41106d9f
Signed-off-by: liuhuahang <liuhuahang@zerus.co>
  • Loading branch information
liuhuahang committed Sep 5, 2014
1 parent 6d31441 commit bb6ae0f
Show file tree
Hide file tree
Showing 21 changed files with 61 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/compaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#include "db/compaction.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <vector>

Expand Down
3 changes: 3 additions & 0 deletions db/compaction_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#include "db/compaction_picker.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <limits>
#include "db/filename.h"
Expand Down
2 changes: 2 additions & 0 deletions db/db_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cstdio>
Expand Down
3 changes: 3 additions & 0 deletions db/db_filesnapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#ifndef ROCKSDB_LITE

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <algorithm>
#include <string>
Expand Down
3 changes: 3 additions & 0 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#include "db/db_impl.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <algorithm>
#include <climits>
Expand Down
3 changes: 3 additions & 0 deletions db/filename.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>

Expand Down
4 changes: 4 additions & 0 deletions db/internal_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>
#include <vector>
#include "db/column_family.h"
Expand Down
3 changes: 3 additions & 0 deletions db/repair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@

#ifndef ROCKSDB_LITE

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include "db/builder.h"
#include "db/db_impl.h"
Expand Down
3 changes: 3 additions & 0 deletions db/version_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#include "db/version_set.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <algorithm>
#include <map>
Expand Down
3 changes: 3 additions & 0 deletions include/rocksdb/utilities/backupable_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
#pragma once
#ifndef ROCKSDB_LITE

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <string>
#include <map>
Expand Down
3 changes: 3 additions & 0 deletions table/cuckoo_table_reader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ int main() {
}
#else

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <gflags/gflags.h>
#include <vector>
Expand Down
3 changes: 3 additions & 0 deletions util/db_info_dummper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>
#include <stdio.h>
#include <string>
Expand Down
3 changes: 3 additions & 0 deletions util/dynamic_bloom_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ int main() {
}
#else

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <algorithm>
#include <gflags/gflags.h>
Expand Down
3 changes: 3 additions & 0 deletions util/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#include "util/logging.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <errno.h>
#include <stdarg.h>
Expand Down
3 changes: 3 additions & 0 deletions util/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
#include "rocksdb/options.h"
#include "rocksdb/immutable_options.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <limits>

Expand Down
3 changes: 3 additions & 0 deletions util/options_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>
#include <gflags/gflags.h>

Expand Down
3 changes: 3 additions & 0 deletions util/rate_limiter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>
#include <limits>
#include "util/testharness.h"
Expand Down
3 changes: 3 additions & 0 deletions util/statistics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
//
#include "util/statistics.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include "rocksdb/statistics.h"
#include "port/likely.h"
Expand Down
2 changes: 2 additions & 0 deletions utilities/backupable/backupable_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include "util/crc32c.h"
#include "rocksdb/transaction_log.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <algorithm>
Expand Down
3 changes: 3 additions & 0 deletions utilities/document/json_document.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

#include "rocksdb/utilities/json_document.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <inttypes.h>
#include <cassert>
#include <string>
Expand Down
2 changes: 2 additions & 0 deletions utilities/geodb/geodb_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

#include "utilities/geodb/geodb_impl.h"

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif

#include <vector>
#include <map>
Expand Down

0 comments on commit bb6ae0f

Please sign in to comment.