mirror of
https://github.com/rui314/mold.git
synced 2026-11-09 04:49:33 -10:00
Resolve remaining Clippy warnings without changing lock semantics
This commit is contained in:
1 parent
c0ef81a144
commit
fbb314400c
4 files changed
+9
-11
No files matched your search
@@ -70,7 +70,7 @@ fn for_each_entry<E: Arch>(ctx: &Context<E>, mut define: impl FnMut(u32, u64)) {
|
||||
};
|
||||
|
||||
for dso in &ctx.dsos {
|
||||
define(DT_NEEDED, dynstr.find_string(&dso.soname));
|
||||
define(DT_NEEDED, dynstr.find_string(dso.soname));
|
||||
}
|
||||
if !ctx.args.rpaths.is_empty() {
|
||||
let tag = if ctx.args.enable_new_dtags {
|
||||
|
||||
@@ -105,7 +105,7 @@ pub fn construct<E: Arch>(ctx: &mut Context<E>) {
|
||||
let start_group = i == 0 || syms[i - 1].0 != dso;
|
||||
if start_group {
|
||||
let soname = ctx.dsos[dso.index()].soname;
|
||||
let vn_file = ctx.dynstr.find_string(&soname) as u32;
|
||||
let vn_file = ctx.dynstr.find_string(soname) as u32;
|
||||
builder.start_group(vn_file);
|
||||
if ctx.args.pack_dyn_relocs_relr && is_glibc2(&ctx.dsos[dso.index()]) {
|
||||
builder.add_entry(&mut ctx.dynstr, b"GLIBC_ABI_DT_RELR");
|
||||
|
||||
+6
-9
@@ -2004,7 +2004,6 @@ pub fn parse_args(target: &TargetTraits, raw_cmdline: &[Cow<'_, OsStr>]) -> Pars
|
||||
rctx: rctx.clone(),
|
||||
name: PathBuf::from(raw_arg),
|
||||
is_lib: true,
|
||||
..Default::default()
|
||||
};
|
||||
job.rctx.pos = vec![jobs.len() as u32];
|
||||
jobs.push(job);
|
||||
@@ -2037,14 +2036,12 @@ pub fn parse_args(target: &TargetTraits, raw_cmdline: &[Cow<'_, OsStr>]) -> Pars
|
||||
}
|
||||
}
|
||||
|
||||
if !a.chroot.as_os_str().is_empty() {
|
||||
if !a.dependency_file.as_os_str().is_empty() {
|
||||
a.dependency_file = a.chroot.join(
|
||||
a.dependency_file
|
||||
.strip_prefix("/")
|
||||
.unwrap_or(&a.dependency_file),
|
||||
);
|
||||
}
|
||||
if !a.chroot.as_os_str().is_empty() && !a.dependency_file.as_os_str().is_empty() {
|
||||
a.dependency_file = a.chroot.join(
|
||||
a.dependency_file
|
||||
.strip_prefix("/")
|
||||
.unwrap_or(&a.dependency_file),
|
||||
);
|
||||
}
|
||||
|
||||
a.map = map_path.map(|mut path| {
|
||||
|
||||
@@ -47,6 +47,7 @@ pub fn acquire_global_lock() {
|
||||
let Ok(file) = OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(false)
|
||||
.mode(0o600)
|
||||
.open(path)
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user