Commit 890b31d
authored
eliminating Warnings (#64)
* first cut at reducing warnings
binaryfusefilter.h only
issues addressed
1. changed some return value and parameter types of (static) functions
-- PLEASE CHECK THIS IN REVIEW
2. sprinkled 'U' into bitwise operations to silence warnings
3. casting to avoid "standard integer promotion rules" which resulted
in signedness warnings
4. explicitly reducing results to the target type rather than letting
it happen implicitly
tests still passing
* first cut at reducing warnings
binaryfusefilter.h only
issues addressed
1. changed some return value and parameter types of (static) functions
-- PLEASE CHECK THIS IN REVIEW
2. sprinkled 'U' into bitwise operations to silence warnings
3. casting to avoid "standard integer promotion rules" which resulted
in signedness warnings
4. explicitly reducing results to the target type rather than letting
it happen implicitly
5. when and `if` statements ends in break or return, then a following
`else if` can be just a new `if`
tests still passing
* starting work on xofilter.h
* binclude/binaryfusefilter.h apparently clean for first time
* formatting
* first cut on xofilter.h
mostly casting size_t down to uint32_t - maybe some internal struct
types should have been size_t?
also some integer promotion casts
* round2 on xorfilter.h
mostly casting blocklengt to uint32_t to fit into keyindex.index
should keyindex.index be a size_t?
* bench.c and unit.c
very repetitive casting of mainly sizes and doubles.
* all silent now on a clean compile
with -Wconversion and -Wsign-conversion
so putting these in the Makefile, so during "private" development with
the Makefile new warnings will be noticed straight away
but not in CMakeLists.txt, because as this is a header-only INTERFACE
library, it would force these warning levels on the users.
* another sweep from including c++ project
turned up these additional 'U' tweaks
* mistaken cast which broke test
* factoring out the report functionality
all sections were indentical except for the call to *contain()
and *size_in_bytes
some void* and function pointer juggling allowed to make this generic
report code reduced by 2/3rds
* iron out slight inconsistencies between tests
* abstracting away the rest of the test logic
for all but the special "failure rate test"
the large function dispatch table is a litle annoying, but can be
removed as well...TBC
tests all pass
* fixing a memory leak caught by sanitizer
just a missing free()1 parent 5906203 commit 890b31d
File tree
5 files changed
+374
-526
lines changed- benchmarks
- include
- tests
5 files changed
+374
-526
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments