diff options
| author | 2021-06-25 18:18:19 +0200 | |
|---|---|---|
| committer | 2021-06-25 18:18:19 +0200 | |
| commit | c3579fa48ab8e814058242e14d3b9d0dc4ff68c2 (patch) | |
| tree | ba1543b344358c9046169830347847b3e8c5379c /sqlite.zig | |
| parent | query: fix new compilation errors (diff) | |
| download | zig-sqlite-c3579fa48ab8e814058242e14d3b9d0dc4ff68c2.tar.gz zig-sqlite-c3579fa48ab8e814058242e14d3b9d0dc4ff68c2.tar.xz zig-sqlite-c3579fa48ab8e814058242e14d3b9d0dc4ff68c2.zip | |
fix 'unused variable' errors
Diffstat (limited to 'sqlite.zig')
| -rw-r--r-- | sqlite.zig | 7 |
1 files changed, 1 insertions, 6 deletions
| @@ -735,12 +735,6 @@ pub fn Iterator(comptime Type: type) type { | |||
| 735 | // The options must contain an `allocator` field which will be used to create a copy of the data. | 735 | // The options must contain an `allocator` field which will be used to create a copy of the data. |
| 736 | fn readBytes(self: *Self, comptime BytesType: type, allocator: *mem.Allocator, _i: usize, comptime mode: ReadBytesMode) !BytesType { | 736 | fn readBytes(self: *Self, comptime BytesType: type, allocator: *mem.Allocator, _i: usize, comptime mode: ReadBytesMode) !BytesType { |
| 737 | const i = @intCast(c_int, _i); | 737 | const i = @intCast(c_int, _i); |
| 738 | const type_info = @typeInfo(BytesType); | ||
| 739 | |||
| 740 | var ret: BytesType = switch (BytesType) { | ||
| 741 | Text, Blob => .{ .data = "" }, | ||
| 742 | else => try dupeWithSentinel(BytesType, allocator, ""), | ||
| 743 | }; | ||
| 744 | 738 | ||
| 745 | switch (mode) { | 739 | switch (mode) { |
| 746 | .Blob => { | 740 | .Blob => { |
| @@ -1250,6 +1244,7 @@ fn addTestData(db: *Db) !void { | |||
| 1250 | 1244 | ||
| 1251 | test "sqlite: db init" { | 1245 | test "sqlite: db init" { |
| 1252 | var db = try getTestDb(); | 1246 | var db = try getTestDb(); |
| 1247 | _ = db; | ||
| 1253 | } | 1248 | } |
| 1254 | 1249 | ||
| 1255 | test "sqlite: db pragma" { | 1250 | test "sqlite: db pragma" { |