diff options
| author | Jacob G-W <jacoblevgw@gmail.com> | 2021-06-19 21:10:22 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-06-21 17:03:03 -0700 |
| commit | 9fffffb07b081858db0c2102a0680aa166b48263 (patch) | |
| tree | 36caed31c5b2aaa8e08bb8e6e90e9b2c30910ff3 /tools | |
| parent | b83b3883ba0b5e965f8f7f1298c77c6d766741af (diff) | |
| download | zig-9fffffb07b081858db0c2102a0680aa166b48263.tar.gz zig-9fffffb07b081858db0c2102a0680aa166b48263.zip | |
fix code broken from previous commit
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/process_headers.zig | 3 | ||||
| -rw-r--r-- | tools/update_clang_options.zig | 3 | ||||
| -rw-r--r-- | tools/update_cpu_features.zig | 3 | ||||
| -rw-r--r-- | tools/update_glibc.zig | 8 | ||||
| -rw-r--r-- | tools/update_spirv_features.zig | 1 |
5 files changed, 15 insertions, 3 deletions
diff --git a/tools/process_headers.zig b/tools/process_headers.zig index c087688732..51fc69e579 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -236,12 +236,14 @@ const DestTarget = struct { const HashContext = struct { pub fn hash(self: @This(), a: DestTarget) u32 { + _ = self; return @enumToInt(a.arch) +% (@enumToInt(a.os) *% @as(u32, 4202347608)) +% (@enumToInt(a.abi) *% @as(u32, 4082223418)); } pub fn eql(self: @This(), a: DestTarget, b: DestTarget) bool { + _ = self; return a.arch.eql(b.arch) and a.os == b.os and a.abi == b.abi; @@ -256,6 +258,7 @@ const Contents = struct { is_generic: bool, fn hitCountLessThan(context: void, lhs: *const Contents, rhs: *const Contents) bool { + _ = context; return lhs.hit_count < rhs.hit_count; } }; diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig index f5f5cc8e24..04cdbf44de 100644 --- a/tools/update_clang_options.zig +++ b/tools/update_clang_options.zig @@ -585,6 +585,8 @@ const Syntax = union(enum) { options: std.fmt.FormatOptions, out_stream: anytype, ) !void { + _ = fmt; + _ = options; switch (self) { .multi_arg => |n| return out_stream.print(".{{.{s}={}}}", .{ @tagName(self), n }), else => return out_stream.print(".{s}", .{@tagName(self)}), @@ -663,6 +665,7 @@ fn syntaxMatchesWithEql(syntax: Syntax) bool { } fn objectLessThan(context: void, a: *json.ObjectMap, b: *json.ObjectMap) bool { + _ = context; // Priority is determined by exact matches first, followed by prefix matches in descending // length, with key as a final tiebreaker. const a_syntax = objSyntax(a); diff --git a/tools/update_cpu_features.zig b/tools/update_cpu_features.zig index dfaeec2862..68d9b233a7 100644 --- a/tools/update_cpu_features.zig +++ b/tools/update_cpu_features.zig @@ -1227,14 +1227,17 @@ fn usageAndExit(file: fs.File, arg0: []const u8, code: u8) noreturn { } fn featureLessThan(context: void, a: Feature, b: Feature) bool { + _ = context; return std.ascii.lessThanIgnoreCase(a.zig_name, b.zig_name); } fn cpuLessThan(context: void, a: Cpu, b: Cpu) bool { + _ = context; return std.ascii.lessThanIgnoreCase(a.zig_name, b.zig_name); } fn asciiLessThan(context: void, a: []const u8, b: []const u8) bool { + _ = context; return std.ascii.lessThanIgnoreCase(a, b); } diff --git a/tools/update_glibc.zig b/tools/update_glibc.zig index 94e4ab756e..ba12f6e0e6 100644 --- a/tools/update_glibc.zig +++ b/tools/update_glibc.zig @@ -155,7 +155,7 @@ pub fn main() !void { } const fn_set = &target_funcs_gop.value_ptr.list; - for (lib_names) |lib_name, lib_name_index| { + for (lib_names) |lib_name| { const lib_prefix = if (std.mem.eql(u8, lib_name, "ld")) "" else "lib"; const basename = try fmt.allocPrint(allocator, "{s}{s}.abilist", .{ lib_prefix, lib_name }); const abi_list_filename = blk: { @@ -263,7 +263,7 @@ pub fn main() !void { // Now the mapping of version and function to integer index is complete. // Here we create a mapping of function name to list of versions. - for (abi_lists) |*abi_list, abi_index| { + for (abi_lists) |*abi_list| { const value = target_functions.getPtr(@ptrToInt(abi_list)).?; const fn_vers_list = &value.fn_vers_list; for (value.list.items) |*ver_fn| { @@ -286,7 +286,7 @@ pub fn main() !void { const abilist_txt = buffered.writer(); // first iterate over the abi lists - for (abi_lists) |*abi_list, abi_index| { + for (abi_lists) |*abi_list| { const fn_vers_list = &target_functions.getPtr(@ptrToInt(abi_list)).?.fn_vers_list; for (abi_list.targets) |target, it_i| { if (it_i != 0) try abilist_txt.writeByte(' '); @@ -312,10 +312,12 @@ pub fn main() !void { } pub fn strCmpLessThan(context: void, a: []const u8, b: []const u8) bool { + _ = context; return std.mem.order(u8, a, b) == .lt; } pub fn versionLessThan(context: void, a: []const u8, b: []const u8) bool { + _ = context; const sep_chars = "GLIBC_."; var a_tokens = std.mem.tokenize(a, sep_chars); var b_tokens = std.mem.tokenize(b, sep_chars); diff --git a/tools/update_spirv_features.zig b/tools/update_spirv_features.zig index 5f2bab6c28..0de1c56934 100644 --- a/tools/update_spirv_features.zig +++ b/tools/update_spirv_features.zig @@ -37,6 +37,7 @@ const Version = struct { } fn lessThan(ctx: void, a: Version, b: Version) bool { + _ = ctx; return if (a.major == b.major) a.minor < b.minor else |
