File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 COMMON_CFLAGS : >-
1111 -Wall
1212 -Werror
13+ -Wno-format
1314 -Wno-format-security
1415 -Wno-unused-but-set-variable
1516 -Wno-unused-const-variable
Original file line number Diff line number Diff line change @@ -21,12 +21,15 @@ test:
2121 zig build test --summary all
2222
2323test-valgrind :
24+ #!/usr/bin/env bash
2425 rm -f /tmp/runner* .fifo
2526
26- clang -O3 example/ main.c dist/ core.c -I includes/ -o clang-main && ./ clang-main
27+ export CFLAGS=" -Wno-error=format -Wno-error=format-security -Wno-format -Wno-format-security"
28+
29+ clang $CFLAGS -O3 example/main.c dist/core.c -I includes/ -o clang-main && ./clang-main
2730 valgrind ./clang-main
2831
29- gcc -O3 example/ main.c dist/ core.c -I includes/ -o gcc-main && ./ gcc-main
32+ gcc $CFLAGS -O3 example/main.c dist/core.c -I includes/ -o gcc-main && ./gcc-main
3033 valgrind ./gcc-main
3134
3235 rm -rf clang-main gcc-main
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ pub const PROTOCOL_VERSION: u64 = 2;
88
99// Note: Using printf to avoid the extra code from std.log/std.debug. Those won't
1010// compile because they are internally using syscalls (for Mutexes) which aren't cross-platform.
11+ //
12+ // We have to use c_char here, otherwise we redeclare it and cast u8 to char which results in
13+ // additional warnings (-Wbuiltin-declaration-mismatch and -Wpointer-sign).
1114extern "c" fn printf (format : [* c ]const c_char , ... ) c_int ;
1215
1316pub const RunnerFifo = struct {
You can’t perform that action at this time.
0 commit comments