diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-11-11 07:27:31 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2023-11-19 09:56:51 +0000 |
| commit | 21fa187abc2a06c9bd5cfe4355c5edbfb3177f6b (patch) | |
| tree | aab7cc16498184bac0fd8b6d5443f7bd606e7bf8 /test/cases/compile_errors/variadic_arg_validation.zig | |
| parent | 2c1acb618027939c0812bc87a432b51632127717 (diff) | |
| download | zig-21fa187abc2a06c9bd5cfe4355c5edbfb3177f6b.tar.gz zig-21fa187abc2a06c9bd5cfe4355c5edbfb3177f6b.zip | |
test: update cases to silence 'var is never mutated' errors
Diffstat (limited to 'test/cases/compile_errors/variadic_arg_validation.zig')
| -rw-r--r-- | test/cases/compile_errors/variadic_arg_validation.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/cases/compile_errors/variadic_arg_validation.zig b/test/cases/compile_errors/variadic_arg_validation.zig index 2e47a4fc1e..0dd0e60ee8 100644 --- a/test/cases/compile_errors/variadic_arg_validation.zig +++ b/test/cases/compile_errors/variadic_arg_validation.zig @@ -7,6 +7,7 @@ pub export fn entry() void { pub export fn entry1() void { var arr: [2]u8 = undefined; _ = printf("%d\n", arr); + _ = &arr; } pub export fn entry2() void { @@ -23,7 +24,7 @@ pub export fn entry3() void { // // :4:33: error: integer and float literals passed to variadic function must be casted to a fixed-size number type // :9:24: error: arrays must be passed by reference to variadic function -// :13:24: error: cannot pass 'u48' to variadic function -// :13:24: note: only integers with 0 or power of two bits are extern compatible -// :17:24: error: cannot pass 'void' to variadic function -// :17:24: note: 'void' is a zero bit type; for C 'void' use 'anyopaque' +// :14:24: error: cannot pass 'u48' to variadic function +// :14:24: note: only integers with 0 or power of two bits are extern compatible +// :18:24: error: cannot pass 'void' to variadic function +// :18:24: note: 'void' is a zero bit type; for C 'void' use 'anyopaque' |
