Skip to content

Commit ba3f524

Browse files
committed
fix snappy more
1 parent c0dc4af commit ba3f524

File tree

35 files changed

+60
-33
lines changed

35 files changed

+60
-33
lines changed

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ header:
6969
- 'thirdparty/fix_libevent_for_macos.patch'
7070
- 'thirdparty/fix_prometheus-cpp_limits.patch'
7171
- 'thirdparty/fix_rocksdb-cmake-PORTABLE-option.patch'
72+
- 'thirdparty/fix_snappy-Wsign-compare-warning.patch'
7273
- 'thirdparty/fix_s2_build_with_absl_and_gtest.patch'
7374
- 'thirdparty/fix_thrift_for_cpp11.patch'
7475
# TODO(yingchun): shell/* files are import from thirdparties, we can move them to thirdparty later.

src/aio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
3535

3636
set(MY_PROJ_LIBS
3737
dsn_runtime
38+
rocksdb
3839
lz4
3940
zstd
40-
rocksdb
4141
snappy)
4242

4343
#Extra files that will be installed

src/aio/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ set(MY_PROJ_LIBS
3838
dsn_runtime
3939
dsn_aio
4040
test_utils
41+
rocksdb
4142
lz4
4243
zstd
43-
rocksdb
4444
snappy)
4545

4646
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/block_service/hdfs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
2828

2929
set(MY_PROJ_LIBS
3030
hdfs
31+
rocksdb
3132
lz4
3233
zstd
33-
rocksdb
3434
snappy)
3535

3636
#Extra files that will be installed

src/block_service/local/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ set(MY_PROJ_SRC "")
2727
set(MY_SRC_SEARCH_MODE "GLOB")
2828

2929
set(MY_PROJ_LIBS
30+
rocksdb
3031
lz4
3132
zstd
32-
rocksdb
3333
snappy)
3434

3535
#Extra files that will be installed

src/block_service/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ set(MY_PROJ_LIBS
3232
gtest_main
3333
hdfs
3434
test_utils
35+
rocksdb
3536
lz4
3637
zstd
37-
rocksdb
3838
snappy)
3939

4040
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/client/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ set(MY_PROJ_LIBS
2727
dsn_runtime
2828
dsn_utils
2929
gtest
30+
rocksdb
3031
lz4
3132
zstd
32-
rocksdb
3333
snappy)
3434

3535
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/common/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ set(MY_PROJ_LIBS
3030
dsn_replication_common
3131
dsn_runtime
3232
gtest
33+
rocksdb
3334
lz4
3435
zstd
35-
rocksdb
3636
snappy)
3737

3838
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/failure_detector/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ set(MY_PROJ_LIBS
4141
dsn.failure_detector
4242
gtest
4343
hashtable
44+
rocksdb
4445
lz4
4546
zstd
46-
rocksdb
4747
snappy)
4848

4949
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/geo/bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ set(MY_PROJ_LIBS
3434
s2testing
3535
s2
3636
pegasus_client_static
37+
rocksdb
3738
lz4
3839
zstd
39-
rocksdb
4040
snappy
4141
dsn_utils)
4242

src/http/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ set(MY_PROJ_LIBS
2626
dsn_runtime
2727
curl
2828
gtest
29+
rocksdb
2930
lz4
3031
zstd
31-
rocksdb
3232
snappy)
3333

3434
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/meta/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ set(MY_PROJ_LIBS
4747
zookeeper
4848
hashtable
4949
hdfs
50+
rocksdb
5051
lz4
5152
zstd
52-
rocksdb
5353
snappy)
5454

5555
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/nfs/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ set(MY_PROJ_LIBS
3838
dsn_runtime
3939
gtest
4040
dsn_aio
41+
rocksdb
4142
lz4
4243
zstd
43-
rocksdb
4444
snappy
4545
test_utils)
4646

src/perf_counter/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
3636
set(MY_PROJ_LIBS
3737
gtest
3838
dsn_runtime
39+
rocksdb
3940
lz4
4041
zstd
41-
rocksdb
4242
snappy)
4343

4444
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/replica/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ set(MY_PROJ_LIBS
6969
dsn_runtime
7070
dsn_aio
7171
dsn_meta_server
72+
rocksdb
7273
lz4
7374
zstd
74-
rocksdb
7575
snappy)
7676

7777
set(MY_BOOST_LIBS Boost::filesystem)

src/replica/backup/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ set(MY_PROJ_LIBS dsn_meta_server
2929
dsn_utils
3030
hashtable
3131
gtest
32+
rocksdb
3233
lz4
3334
zstd
34-
rocksdb
3535
snappy)
3636

3737
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/replica/bulk_load/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ set(MY_PROJ_LIBS dsn_meta_server
2828
hashtable
2929
gtest
3030
test_utils
31+
rocksdb
3132
lz4
3233
zstd
33-
rocksdb
3434
snappy)
3535

3636
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/replica/duplication/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ set(MY_PROJ_LIBS dsn_meta_server
3131
hashtable
3232
gtest
3333
test_utils
34+
rocksdb
3435
lz4
3536
zstd
36-
rocksdb
3737
snappy)
3838

3939
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/replica/storage/simple_kv/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ set(MY_PROJ_LIBS
4343
dsn_client
4444
dsn_runtime
4545
hashtable
46+
rocksdb
4647
lz4
4748
zstd
48-
rocksdb
4949
snappy)
5050

5151
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/replica/storage/simple_kv/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ set(MY_PROJ_LIBS
4141
hashtable
4242
gtest
4343
dsn_utils
44+
rocksdb
4445
lz4
4546
zstd
46-
rocksdb
4747
snappy)
4848

4949
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/replica/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ set(MY_PROJ_LIBS
4848
hashtable
4949
gtest
5050
test_utils
51+
rocksdb
5152
lz4
5253
zstd
53-
rocksdb
5454
snappy)
5555

5656
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/runtime/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ set(MY_PROJ_LIBS
3434
dsn_runtime
3535
dsn_aio
3636
dsn_meta_server
37+
rocksdb
3738
lz4
3839
zstd
39-
rocksdb
4040
snappy)
4141

4242
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/server/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ set(MY_PROJ_LIBS
3636
dsn.failure_detector
3737
dsn.replication.zookeeper_provider
3838
dsn_utils
39+
rocksdb
3940
lz4
4041
zstd
41-
rocksdb
4242
snappy
4343
pegasus_reporter
4444
pegasus_base

src/server/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ set(MY_PROJ_LIBS
4646
dsn.replication.zookeeper_provider
4747
dsn_utils
4848
pegasus_reporter
49+
rocksdb
4950
lz4
5051
zstd
51-
rocksdb
5252
snappy
5353
pegasus_client_static
5454
event

src/shell/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ set(MY_PROJ_LIBS
4141
dsn.failure_detector
4242
pegasus_client_static
4343
pegasus_geo_lib
44+
rocksdb
4445
lz4
4546
zstd
46-
rocksdb
4747
snappy
4848
absl::flat_hash_set
4949
absl::strings

src/test/bench_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
3030
set(MY_PROJ_LIBS
3131
pegasus_client_static
3232
dsn_utils
33+
rocksdb
3334
lz4
3435
zstd
35-
rocksdb
3636
snappy
3737
sasl2
3838
gssapi_krb5

src/test/function_test/bulk_load/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ set(MY_PROJ_LIBS
3838
krb5
3939
function_test_utils
4040
test_utils
41+
rocksdb
4142
lz4
4243
zstd
43-
rocksdb
4444
snappy)
4545

4646
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/test_util/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
2424

2525
set(MY_PROJ_LIBS
2626
gtest
27+
rocksdb
2728
lz4
2829
zstd
29-
rocksdb
3030
snappy)
3131

3232
dsn_add_static_library()

src/utils/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ set(MY_BOOST_LIBS Boost::system Boost::filesystem)
3333

3434
set(MY_PROJ_LIBS
3535
dsn_http
36+
rocksdb
3637
lz4
3738
zstd
38-
rocksdb
3939
snappy)
4040

4141
# Extra files that will be installed

src/utils/long_adder_bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
3030
set(MY_PROJ_LIBS
3131
dsn_runtime
3232
dsn_utils
33+
rocksdb
3334
lz4
3435
zstd
35-
rocksdb
3636
snappy)
3737

3838
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/utils/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ set(MY_PROJ_LIBS
3535
dsn_utils
3636
gtest
3737
test_utils
38+
rocksdb
3839
lz4
3940
zstd
40-
rocksdb
4141
snappy)
4242

4343
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/utils/test/nth_element_bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ set(MY_SRC_SEARCH_MODE "GLOB")
3030
set(MY_PROJ_LIBS
3131
dsn_runtime
3232
dsn_utils
33+
rocksdb
3334
lz4
3435
zstd
35-
rocksdb
3636
snappy)
3737

3838
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

src/zookeeper/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ set(MY_PROJ_LIBS
3939
zookeeper
4040
hashtable
4141
gtest
42+
rocksdb
4243
lz4
4344
zstd
44-
rocksdb
4545
snappy)
4646

4747
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

thirdparty/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ ExternalProject_Add(snappy
381381
URL ${OSS_URL_PREFIX}/snappy-1.1.10.tar.gz
382382
https://github.com/google/snappy/archive/refs/tags/1.1.10.tar.gz
383383
URL_MD5 70153395ebe6d72febe2cf2e40026a44
384-
PATCH_COMMAND ""
384+
PATCH_COMMAND patch -p1 < ${TP_DIR}/fix_snappy-Wsign-compare-warning.patch
385385
CMAKE_ARGS ${SNAPPY_OPTIONS}
386386
BUILD_COMMAND make -j${PARALLEL}
387387
INSTALL_COMMAND make install
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 27f34a580be4a3becf5f8c0cba13433f53c21337 Mon Sep 17 00:00:00 2001
2+
From: Richard O'Grady <rjogrady@google.com>
3+
Date: Wed, 12 Jul 2023 10:12:01 -0700
4+
Subject: [PATCH] Fix -Wsign-compare warning
5+
6+
PiperOrigin-RevId: 547529709
7+
---
8+
snappy.cc | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/snappy.cc b/snappy.cc
12+
index 688065b..6473123 100644
13+
--- a/snappy.cc
14+
+++ b/snappy.cc
15+
@@ -1289,7 +1289,7 @@ std::pair<const uint8_t*, ptrdiff_t> DecompressBranchless(
16+
DeferMemCopy(&deferred_src, &deferred_length, from, len);
17+
}
18+
} while (ip < ip_limit_min_slop &&
19+
- (op + deferred_length) < op_limit_min_slop);
20+
+ static_cast<ptrdiff_t>(op + deferred_length) < op_limit_min_slop);
21+
exit:
22+
ip--;
23+
assert(ip <= ip_limit);
24+
--
25+
2.42.1
26+

0 commit comments

Comments
 (0)