From 9d8793702960e77ed2d58b78f2a47e7ce9811439 Mon Sep 17 00:00:00 2001 From: Philip Craig Date: Sun, 26 May 2024 13:37:35 +1000 Subject: [PATCH] Fix clippy warnings --- src/macho.rs | 21 --------------------- src/read/archive.rs | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/macho.rs b/src/macho.rs index d77f113a..88919d62 100644 --- a/src/macho.rs +++ b/src/macho.rs @@ -305,7 +305,6 @@ pub struct DyldCacheHeader { pub images_count: U32, // offset: 0x1c /// base address of dyld when cache was built pub dyld_base_address: U64, // offset: 0x20 - /// reserved1: [u8; 32], // offset: 0x28 /// file offset of where local symbols are stored pub local_symbols_offset: U64, // offset: 0x48 @@ -313,23 +312,14 @@ pub struct DyldCacheHeader { pub local_symbols_size: U64, // offset: 0x50 /// unique value for each shared cache file pub uuid: [u8; 16], // offset: 0x58 - /// reserved2: [u8; 32], // offset: 0x68 - /// reserved3: [u8; 32], // offset: 0x88 - /// reserved4: [u8; 32], // offset: 0xa8 - /// reserved5: [u8; 32], // offset: 0xc8 - /// reserved6: [u8; 32], // offset: 0xe8 - /// reserved7: [u8; 32], // offset: 0x108 - /// reserved8: [u8; 32], // offset: 0x128 - /// reserved9: [u8; 32], // offset: 0x148 - /// reserved10: [u8; 32], // offset: 0x168 /// file offset to first dyld_subcache_info pub subcaches_offset: U32, // offset: 0x188 @@ -337,7 +327,6 @@ pub struct DyldCacheHeader { pub subcaches_count: U32, // offset: 0x18c /// the UUID of the .symbols subcache pub symbols_subcache_uuid: [u8; 16], // offset: 0x190 - /// reserved11: [u8; 32], // offset: 0x1a0 /// file offset to first dyld_cache_image_info /// Use this instead of images_offset if mapping_offset is at least 0x1c4. @@ -351,15 +340,10 @@ pub struct DyldCacheHeader { #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct DyldCacheMappingInfo { - /// pub address: U64, - /// pub size: U64, - /// pub file_offset: U64, - /// pub max_prot: U32, - /// pub init_prot: U32, } @@ -367,15 +351,10 @@ pub struct DyldCacheMappingInfo { #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct DyldCacheImageInfo { - /// pub address: U64, - /// pub mod_time: U64, - /// pub inode: U64, - /// pub path_file_offset: U32, - /// pub pad: U32, } diff --git a/src/read/archive.rs b/src/read/archive.rs index 162889bd..0e01b8a6 100644 --- a/src/read/archive.rs +++ b/src/read/archive.rs @@ -145,7 +145,7 @@ impl<'data, R: ReadRef<'data>> ArchiveFile<'data, R> { } } if tail < len { - let member = ArchiveMember::parse(data, &mut tail, &file.names, thin)?; + let member = ArchiveMember::parse(data, &mut tail, file.names, thin)?; if member.name == b"//" { // COFF EC Symbol Table. members_offset = tail;