authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-05-10 16:26:54+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-05-11 17:23:06+03:00
logf0fdaf32d3b802e9db16a0753d9ff49a8667089b
tree5ff1ea4e3897869e3e01e8231acb393b83a7e591
parent67afd2a470153681d3a2323ec388e3ecd545cef1

fix incorrect use of mutable pointers to temporary values


4 files changed, 4 insertions(+), 4 deletions(-)

lib/std/os/linux/x86.zig+1-1
......@@ -108,7 +108,7 @@ pub fn syscall6(
108108 );
109109}
110110
111pub fn socketcall(call: usize, args: [*]usize) usize {
111pub fn socketcall(call: usize, args: [*]const usize) usize {
112112 return asm volatile ("int $0x80"
113113 : [ret] "={eax}" (-> usize),
114114 : [number] "{eax}" (@enumToInt(SYS.socketcall)),
src/Module.zig+1-1
......@@ -6098,7 +6098,7 @@ pub const PeerTypeCandidateSrc = union(enum) {
60986098 none: void,
60996099 /// When we want to know the the src of candidate i, look up at
61006100 /// index i in this slice
6101 override: []?LazySrcLoc,
6101 override: []const ?LazySrcLoc,
61026102 /// resolvePeerTypes originates from a @TypeOf(...) call
61036103 typeof_builtin_call_node_offset: i32,
61046104
src/link/MachO/Atom.zig+1-1
......@@ -116,7 +116,7 @@ pub fn addRelocation(macho_file: *MachO, atom_index: Index, reloc: Relocation) !
116116 return addRelocations(macho_file, atom_index, &[_]Relocation{reloc});
117117}
118118
119pub fn addRelocations(macho_file: *MachO, atom_index: Index, relocs: []Relocation) !void {
119pub fn addRelocations(macho_file: *MachO, atom_index: Index, relocs: []const Relocation) !void {
120120 const gpa = macho_file.base.allocator;
121121 const gop = try macho_file.relocs.getOrPut(gpa, atom_index);
122122 if (!gop.found_existing) {
test/behavior/array.zig+1-1
......@@ -667,7 +667,7 @@ test "array init of container level array variable" {
667667test "runtime initialized sentinel-terminated array literal" {
668668 var c: u16 = 300;
669669 const f = &[_:0x9999]u16{c};
670 const g = @ptrCast(*[4]u8, f);
670 const g = @ptrCast(*const [4]u8, f);
671671 try std.testing.expect(g[2] == 0x99);
672672 try std.testing.expect(g[3] == 0x99);
673673}