Skip to content

Commit bcd1f15

Browse files
committed
Remove -Wno-unused-const-variable
1 parent ea0198f commit bcd1f15

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ else
4444
PLATFORM_CCFLAGS += $(JEMALLOC_INCLUDE) -DHAVE_JEMALLOC
4545
endif
4646

47-
WARNING_FLAGS = -Wall -Werror -Wno-sign-compare -Wno-unused-const-variable
47+
WARNING_FLAGS = -Wall -Werror -Wno-sign-compare
4848
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
4949
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual
5050

include/rocksdb/perf_context.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct PerfContext {
6464
uint64_t write_memtable_time;
6565
};
6666

67-
#if defined(OS_MACOSX)
67+
#if defined(IOS_CROSS_COMPILE)
6868
extern PerfContext perf_context;
6969
#else
7070
extern __thread PerfContext perf_context;

table/block_based_table_reader.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ namespace {
4545
// The longest the prefix of the cache key used to identify blocks can be.
4646
// We are using the fact that we know for Posix files the unique ID is three
4747
// varints.
48-
const size_t kMaxCacheKeyPrefixSize = kMaxVarint64Length*3+1;
48+
// For some reason, compiling for iOS complains that this variable is unused
49+
const size_t kMaxCacheKeyPrefixSize __attribute__((unused)) =
50+
kMaxVarint64Length * 3 + 1;
4951

5052
// Read the block identified by "handle" from "file".
5153
// The only relevant option is options.verify_checksums for now.

0 commit comments

Comments
 (0)