Skip to content

Commit 61d9904

Browse files
committed
fix(codspeed): suppress warnings, but still show them with cargo
1 parent 19ad9f2 commit 61d9904

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

crates/codspeed/build.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ fn main() {
1010
.flag("-std=c11")
1111
.file("instrument-hooks/dist/core.c")
1212
.include("instrument-hooks/includes")
13+
// We generated the C code from Zig, which contains some warnings
14+
// that can be safely ignored.
15+
.flag("-Wno-format")
16+
.flag("-Wno-format-security")
17+
.flag("-Wno-unused-but-set-variable")
18+
.flag("-Wno-unused-const-variable")
19+
.flag("-Wno-type-limits")
20+
.flag("-Wno-uninitialized")
21+
// Ignore warnings when cross-compiling:
22+
.flag("-Wno-overflow")
23+
.flag("-Wno-unused-function")
24+
.flag("-Wno-constant-conversion")
25+
.flag("-Wno-incompatible-pointer-types")
26+
// Disable warnings, as we will have lots of them
1327
.warnings(false)
1428
.extra_warnings(false)
1529
.cargo_warnings(false);

0 commit comments

Comments
 (0)