Commit 87006c4
[TSan] Fix asan_mac.cpp function pointer cast warnings (llvm#151517)
Fixes these compiler warnings:
```
.../llvm-project/compiler-rt/lib/asan/asan_mac.cpp:252:4: warning: cast from 'dispatch_function_t' (aka 'void (*)(void *)') to 'void (*)(void *, size_t)' (aka 'void (*)(void *, unsigned long)') converts to incompatible function type [-Wcast-function-type-mismatch]
252 | ((void (*)(void *, size_t))asan_ctxt->func)(asan_ctxt->block, iteration);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../llvm-project/compiler-rt/lib/asan/asan_mac.cpp:259:32: warning: cast from 'void (*)(void *, size_t)' (aka 'void (*)(void *, unsigned long)') to 'dispatch_function_t' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-mismatch]
259 | alloc_asan_context(ctxt, (dispatch_function_t)work, &stack);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
```
(cherry picked from commit e7e7494)1 parent d3c23ac commit 87006c4
1 file changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
180 | | - | |
181 | | - | |
| 185 | + | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
| |||
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
196 | | - | |
| 201 | + | |
197 | 202 | | |
198 | 203 | | |
199 | 204 | | |
| |||
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
252 | | - | |
| 257 | + | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
256 | | - | |
| 261 | + | |
257 | 262 | | |
258 | 263 | | |
259 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
260 | 268 | | |
261 | 269 | | |
262 | 270 | | |
| |||
0 commit comments