Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed May 26, 2024
1 parent 71f9edb commit 9d87937
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
21 changes: 0 additions & 21 deletions src/macho.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,39 +305,28 @@ pub struct DyldCacheHeader<E: Endian> {
pub images_count: U32<E>, // offset: 0x1c
/// base address of dyld when cache was built
pub dyld_base_address: U64<E>, // offset: 0x20
///
reserved1: [u8; 32], // offset: 0x28
/// file offset of where local symbols are stored
pub local_symbols_offset: U64<E>, // offset: 0x48
/// size of local symbols information
pub local_symbols_size: U64<E>, // 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<E>, // offset: 0x188
/// number of dyld_subcache_info entries
pub subcaches_count: U32<E>, // 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.
Expand All @@ -351,31 +340,21 @@ pub struct DyldCacheHeader<E: Endian> {
#[derive(Debug, Clone, Copy)]
#[repr(C)]
pub struct DyldCacheMappingInfo<E: Endian> {
///
pub address: U64<E>,
///
pub size: U64<E>,
///
pub file_offset: U64<E>,
///
pub max_prot: U32<E>,
///
pub init_prot: U32<E>,
}

/// Corresponds to struct dyld_cache_image_info from dyld_cache_format.h.
#[derive(Debug, Clone, Copy)]
#[repr(C)]
pub struct DyldCacheImageInfo<E: Endian> {
///
pub address: U64<E>,
///
pub mod_time: U64<E>,
///
pub inode: U64<E>,
///
pub path_file_offset: U32<E>,
///
pub pad: U32<E>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/read/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"/<ECSYMBOLS>/" {
// COFF EC Symbol Table.
members_offset = tail;
Expand Down

0 comments on commit 9d87937

Please sign in to comment.