| author | |
| committer | |
| log | 4c75f834e7195d05ca4f358aa093003e60380be7 |
| tree | 23c0e8998a21e7f5c0d8e08bc580c3a449e92174 |
| parent | 8c5d4295e5f6459ba99d219c1922a30ec6da24bf |
4 files changed, 7 insertions(+), 7 deletions(-)
src/Module.zig+2-2| ... | ... | @@ -1071,7 +1071,7 @@ pub const Scope = struct { |
| 1071 | 1071 | if (stat.size > std.math.maxInt(u32)) |
| 1072 | 1072 | return error.FileTooBig; |
| 1073 | 1073 | |
| 1074 | const source = try gpa.allocSentinel(u8, stat.size, 0); | |
| 1074 | const source = try gpa.allocSentinel(u8, @intCast(usize, stat.size), 0); | |
| 1075 | 1075 | defer if (!file.source_loaded) gpa.free(source); |
| 1076 | 1076 | const amt = try f.readAll(source); |
| 1077 | 1077 | if (amt != stat.size) |
| ... | ... | @@ -2441,7 +2441,7 @@ pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node |
| 2441 | 2441 | if (stat.size > std.math.maxInt(u32)) |
| 2442 | 2442 | return error.FileTooBig; |
| 2443 | 2443 | |
| 2444 | const source = try gpa.allocSentinel(u8, stat.size, 0); | |
| 2444 | const source = try gpa.allocSentinel(u8, @intCast(usize, stat.size), 0); | |
| 2445 | 2445 | defer if (!file.source_loaded) gpa.free(source); |
| 2446 | 2446 | const amt = try source_file.readAll(source); |
| 2447 | 2447 | if (amt != stat.size) |
src/Sema.zig+1-1| ... | ... | @@ -2483,7 +2483,7 @@ fn zirIntToError(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index) InnerEr |
| 2483 | 2483 | const payload = try sema.arena.create(Value.Payload.Error); |
| 2484 | 2484 | payload.* = .{ |
| 2485 | 2485 | .base = .{ .tag = .@"error" }, |
| 2486 | .data = .{ .name = sema.mod.error_name_list.items[int] }, | |
| 2486 | .data = .{ .name = sema.mod.error_name_list.items[@intCast(usize, int)] }, | |
| 2487 | 2487 | }; |
| 2488 | 2488 | return sema.mod.constInst(sema.arena, src, .{ |
| 2489 | 2489 | .ty = Type.initTag(.anyerror), |
src/main.zig+3-3| ... | ... | @@ -3642,7 +3642,7 @@ pub fn cmdAstCheck( |
| 3642 | 3642 | if (stat.size > max_src_size) |
| 3643 | 3643 | return error.FileTooBig; |
| 3644 | 3644 | |
| 3645 | const source = try arena.allocSentinel(u8, stat.size, 0); | |
| 3645 | const source = try arena.allocSentinel(u8, @intCast(usize, stat.size), 0); | |
| 3646 | 3646 | const amt = try f.readAll(source); |
| 3647 | 3647 | if (amt != stat.size) |
| 3648 | 3648 | return error.UnexpectedEndOfFile; |
| ... | ... | @@ -3778,7 +3778,7 @@ pub fn cmdChangelist( |
| 3778 | 3778 | .root_decl = null, |
| 3779 | 3779 | }; |
| 3780 | 3780 | |
| 3781 | const source = try arena.allocSentinel(u8, stat.size, 0); | |
| 3781 | const source = try arena.allocSentinel(u8, @intCast(usize, stat.size), 0); | |
| 3782 | 3782 | const amt = try f.readAll(source); |
| 3783 | 3783 | if (amt != stat.size) |
| 3784 | 3784 | return error.UnexpectedEndOfFile; |
| ... | ... | @@ -3818,7 +3818,7 @@ pub fn cmdChangelist( |
| 3818 | 3818 | if (new_stat.size > max_src_size) |
| 3819 | 3819 | return error.FileTooBig; |
| 3820 | 3820 | |
| 3821 | const new_source = try arena.allocSentinel(u8, new_stat.size, 0); | |
| 3821 | const new_source = try arena.allocSentinel(u8, @intCast(usize, new_stat.size), 0); | |
| 3822 | 3822 | const new_amt = try new_f.readAll(new_source); |
| 3823 | 3823 | if (new_amt != new_stat.size) |
| 3824 | 3824 | return error.UnexpectedEndOfFile; |
src/type.zig+1-1| ... | ... | @@ -2641,7 +2641,7 @@ pub const Type = extern union { |
| 2641 | 2641 | }; |
| 2642 | 2642 | const end_val = Value.initPayload(&end_payload.base); |
| 2643 | 2643 | if (int_val.compare(.gte, end_val)) return null; |
| 2644 | return int_val.toUnsignedInt(); | |
| 2644 | return @intCast(usize, int_val.toUnsignedInt()); | |
| 2645 | 2645 | } |
| 2646 | 2646 | }; |
| 2647 | 2647 | switch (ty.tag()) { |