| ... | ... | @@ -755,8 +755,7 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { |
| 755 | 755 | return cap * 2 / 3 + 1; |
| 756 | 756 | } |
| 757 | 757 | }; |
| 758 | | var hash_tbl_hdr: HashTableHeader = undefined; |
| 759 | | try pdb_stream.stream.readStruct(HashTableHeader, &hash_tbl_hdr); |
| 758 | const hash_tbl_hdr = try pdb_stream.stream.readStruct(HashTableHeader); |
| 760 | 759 | if (hash_tbl_hdr.Capacity == 0) |
| 761 | 760 | return error.InvalidDebugInfo; |
| 762 | 761 | |
| ... | ... | @@ -790,8 +789,7 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { |
| 790 | 789 | const dbi = di.pdb.dbi; |
| 791 | 790 | |
| 792 | 791 | // Dbi Header |
| 793 | | var dbi_stream_header: pdb.DbiStreamHeader = undefined; |
| 794 | | try dbi.stream.readStruct(pdb.DbiStreamHeader, &dbi_stream_header); |
| 792 | const dbi_stream_header = try dbi.stream.readStruct(pdb.DbiStreamHeader); |
| 795 | 793 | const mod_info_size = dbi_stream_header.ModInfoSize; |
| 796 | 794 | const section_contrib_size = dbi_stream_header.SectionContributionSize; |
| 797 | 795 | |
| ... | ... | @@ -800,8 +798,7 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { |
| 800 | 798 | // Module Info Substream |
| 801 | 799 | var mod_info_offset: usize = 0; |
| 802 | 800 | while (mod_info_offset != mod_info_size) { |
| 803 | | var mod_info: pdb.ModInfo = undefined; |
| 804 | | try dbi.stream.readStruct(pdb.ModInfo, &mod_info); |
| 801 | const mod_info = try dbi.stream.readStruct(pdb.ModInfo); |
| 805 | 802 | var this_record_len: usize = @sizeOf(pdb.ModInfo); |
| 806 | 803 | |
| 807 | 804 | const module_name = try dbi.readNullTermString(allocator); |
| ... | ... | @@ -845,7 +842,7 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { |
| 845 | 842 | } |
| 846 | 843 | while (sect_cont_offset != section_contrib_size) { |
| 847 | 844 | const entry = try sect_contribs.addOne(); |
| 848 | | try dbi.stream.readStruct(pdb.SectionContribEntry, entry); |
| 845 | entry.* = try dbi.stream.readStruct(pdb.SectionContribEntry); |
| 849 | 846 | sect_cont_offset += @sizeOf(pdb.SectionContribEntry); |
| 850 | 847 | |
| 851 | 848 | if (sect_cont_offset > section_contrib_size) |