aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2023-05-10 16:26:54 +0300
committerVeikka Tuominen <git@vexu.eu>2023-05-11 17:23:06 +0300
commitf0fdaf32d3b802e9db16a0753d9ff49a8667089b (patch)
tree5ff1ea4e3897869e3e01e8231acb393b83a7e591 /src
parent67afd2a470153681d3a2323ec388e3ecd545cef1 (diff)
downloadzig-f0fdaf32d3b802e9db16a0753d9ff49a8667089b.tar.gz
zig-f0fdaf32d3b802e9db16a0753d9ff49a8667089b.zip
fix incorrect use of mutable pointers to temporary values
Diffstat (limited to 'src')
-rw-r--r--src/Module.zig2
-rw-r--r--src/link/MachO/Atom.zig2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig
index b0c18def78..6d1a5acb09 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -6098,7 +6098,7 @@ pub const PeerTypeCandidateSrc = union(enum) {
none: void,
/// When we want to know the the src of candidate i, look up at
/// index i in this slice
- override: []?LazySrcLoc,
+ override: []const ?LazySrcLoc,
/// resolvePeerTypes originates from a @TypeOf(...) call
typeof_builtin_call_node_offset: i32,
diff --git a/src/link/MachO/Atom.zig b/src/link/MachO/Atom.zig
index fb05595b7d..970371e455 100644
--- a/src/link/MachO/Atom.zig
+++ b/src/link/MachO/Atom.zig
@@ -116,7 +116,7 @@ pub fn addRelocation(macho_file: *MachO, atom_index: Index, reloc: Relocation) !
return addRelocations(macho_file, atom_index, &[_]Relocation{reloc});
}
-pub fn addRelocations(macho_file: *MachO, atom_index: Index, relocs: []Relocation) !void {
+pub fn addRelocations(macho_file: *MachO, atom_index: Index, relocs: []const Relocation) !void {
const gpa = macho_file.base.allocator;
const gop = try macho_file.relocs.getOrPut(gpa, atom_index);
if (!gop.found_existing) {