| author | |
| committer | |
| log | 3d9b6cfcc9341cef40a8a525a4acf8be8b81992c |
| tree | 4ac796abca2c07800e7438bdf71c6d517e9c0f4e |
| parent | 56129d26ebd8c54563e92a78b9dab20f69dbc646 |
Adds a `unused: u32 = 0` field to `Zir.Header`.
We could leave this as padding, however it triggers a Valgrind warning because
we read and write undefined bytes to the file system. This is harmless, but
it's essentially free to have a zero field here and makes the warning go away,
making it more likely that following Valgrind warnings will be taken seriously.1 files changed, 5 insertions(+), 1 deletions(-)
src/Zir.zig+5-1| ... | ... | @@ -43,7 +43,11 @@ pub const Header = extern struct { |
| 43 | 43 | instructions_len: u32, |
| 44 | 44 | string_bytes_len: u32, |
| 45 | 45 | extra_len: u32, |
| 46 | ||
| 46 | /// We could leave this as padding, however it triggers a Valgrind warning because | |
| 47 | /// we read and write undefined bytes to the file system. This is harmless, but | |
| 48 | /// it's essentially free to have a zero field here and makes the warning go away, | |
| 49 | /// making it more likely that following Valgrind warnings will be taken seriously. | |
| 50 | unused: u32 = 0, | |
| 47 | 51 | stat_inode: std.fs.File.INode, |
| 48 | 52 | stat_size: u64, |
| 49 | 53 | stat_mtime: i128, |