@matheusbsbs / matheus-bagliano / commits / 066b70ae97
Fork 0

bloom: fix `make sparse` warning

* We need a `final_new_line` to make our source code as text file, per POSIX and C specification. * `bloom_filters` should be limited to interal linkage only Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Đoàn Trần Công Danh committed May 8, 2020 at 00:51 UTC 066b70ae977b6481b15ebccb7c5deedf23c944ed
5 files changed +6 -6
bloom.c
+2 -2
@@ -9,7 +9,7 @@
9
10 define_commit_slab(bloom_filter_slab, struct bloom_filter);
11
12 -struct bloom_filter_slab bloom_filters;
12 +static struct bloom_filter_slab bloom_filters;
13
14 struct pathmap_hash_entry {
15 struct hashmap_entry entry;
@@ -273,4 +273,4 @@ int bloom_filter_contains(const struct bloom_filter *filter,
273 }
274
275 return 1;
276 -}
\ No newline at end of file
276 +}
bloom.h
+1 -1
@@ -87,4 +87,4 @@ int bloom_filter_contains(const struct bloom_filter *filter,
87 const struct bloom_key *key,
88 const struct bloom_filter_settings *settings);
89
90 -#endif
\ No newline at end of file
90 +#endif
t/helper/test-bloom.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "test-tool.h"
4 #include "commit.h"
5
6 -struct bloom_filter_settings settings = DEFAULT_BLOOM_FILTER_SETTINGS;
6 +static struct bloom_filter_settings settings = DEFAULT_BLOOM_FILTER_SETTINGS;
7
8 static void add_string_to_filter(const char *data, struct bloom_filter *filter) {
9 struct bloom_key key;
t/t0095-bloom.sh
+1 -1
@@ -114,4 +114,4 @@ test_expect_success EXPENSIVE 'get bloom filter for commit with 513 changes' '
114 test_cmp expect actual
115 '
116
117 -test_done
\ No newline at end of file
117 +test_done
t/t4216-log-bloom.sh
+1 -1
@@ -152,4 +152,4 @@ test_expect_success 'Use Bloom filters if they exist in the latest but not all c
152 test_bloom_filters_used_when_some_filters_are_missing "-- A/B"
153 '
154
155 -test_done
\ No newline at end of file
155 +test_done