aboutsummaryrefslogtreecommitdiff
path: root/lib/std/leb128.zig
diff options
context:
space:
mode:
authorJacob G-W <jacoblevgw@gmail.com>2021-06-09 21:35:42 -0400
committerAndrew Kelley <andrew@ziglang.org>2021-06-21 17:03:03 -0700
commit641ecc260f43ffb2398acb80cbd141535dbbb03d (patch)
tree87455d3b460f517ad35bcda2b3a2e38599dd4aa1 /lib/std/leb128.zig
parentd34a1ccb0ea75ba31f374b8b2d34e18326b147b1 (diff)
downloadzig-641ecc260f43ffb2398acb80cbd141535dbbb03d.tar.gz
zig-641ecc260f43ffb2398acb80cbd141535dbbb03d.zip
std, src, doc, test: remove unused variables
Diffstat (limited to 'lib/std/leb128.zig')
-rw-r--r--lib/std/leb128.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/std/leb128.zig b/lib/std/leb128.zig
index b1f56e21ab..6535c867f8 100644
--- a/lib/std/leb128.zig
+++ b/lib/std/leb128.zig
@@ -198,7 +198,7 @@ fn test_read_ileb128_seq(comptime T: type, comptime N: usize, encoded: []const u
var reader = std.io.fixedBufferStream(encoded);
var i: usize = 0;
while (i < N) : (i += 1) {
- const v1 = try readILEB128(T, reader.reader());
+ _ = try readILEB128(T, reader.reader());
}
}
@@ -206,7 +206,7 @@ fn test_read_uleb128_seq(comptime T: type, comptime N: usize, encoded: []const u
var reader = std.io.fixedBufferStream(encoded);
var i: usize = 0;
while (i < N) : (i += 1) {
- const v1 = try readULEB128(T, reader.reader());
+ _ = try readULEB128(T, reader.reader());
}
}
@@ -309,7 +309,6 @@ fn test_write_leb128(value: anytype) !void {
const B = std.meta.Int(signedness, larger_type_bits);
const bytes_needed = bn: {
- const S = std.meta.Int(signedness, @sizeOf(T) * 8);
if (@typeInfo(T).Int.bits <= 7) break :bn @as(u16, 1);
const unused_bits = if (value < 0) @clz(T, ~value) else @clz(T, value);