Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new warnings #166

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/nix-packaging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "Nix Packaging"

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Rust

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
format:
name: Format
name: format
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -17,7 +21,7 @@ jobs:
run: cargo fmt --all --check --verbose

build:
name: Build & Test
name: build & test
strategy:
matrix:
target:
Expand Down Expand Up @@ -57,7 +61,7 @@ jobs:
run: cargo clippy --workspace --verbose --target=${{ matrix.target }} -- -Dwarnings

cross-compile:
name: With Cross
name: cross
strategy:
matrix:
target:
Expand Down Expand Up @@ -86,7 +90,7 @@ jobs:
run: cross clippy --workspace --verbose --target=${{ matrix.target }} -- -Dwarnings

aarch64-win:
name: Aarch64 Windows
name: windows aarch64
strategy:
matrix:
target:
Expand Down
4 changes: 2 additions & 2 deletions samply-api/src/asm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ impl InstructionDecoding for yaxpeax_x86::amd64::Arch {
+ inst.len().to_const() as i64
+ rel as i64;
intel_insn = format!("{} 0x{:x}", inst.opcode(), dest);
c_insn = intel_insn.clone();
c_insn.clone_from(&intel_insn);
}
Operand::ImmediateI32(rel) => {
let dest = rel_address as i64
+ offset as i64
+ inst.len().to_const() as i64
+ rel as i64;
intel_insn = format!("{} 0x{:x}", inst.opcode(), dest);
c_insn = intel_insn.clone();
c_insn.clone_from(&intel_insn);
}
_ => {}
};
Expand Down
2 changes: 1 addition & 1 deletion samply-symbols/src/breakpad/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ impl BreakpadIndexParserInner {
debug_name.to_string(),
));
}
self.module_info_bytes = input.to_owned();
input.clone_into(&mut self.module_info_bytes);
return;
}
let line_length = input.len() as u32;
Expand Down
12 changes: 6 additions & 6 deletions samply-symbols/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,25 +307,25 @@ impl LibraryInfo {
/// matches.
pub fn absorb(&mut self, other: &LibraryInfo) {
if self.debug_name.is_none() && other.debug_name.is_some() {
self.debug_name = other.debug_name.clone();
self.debug_name.clone_from(&other.debug_name);
}
if self.debug_id.is_none() && other.debug_id.is_some() {
self.debug_id = other.debug_id;
}
if self.debug_path.is_none() && other.debug_path.is_some() {
self.debug_path = other.debug_path.clone();
self.debug_path.clone_from(&other.debug_path);
}
if self.name.is_none() && other.name.is_some() {
self.name = other.name.clone();
self.name.clone_from(&other.name);
}
if self.code_id.is_none() && other.code_id.is_some() {
self.code_id = other.code_id.clone();
self.code_id.clone_from(&other.code_id);
}
if self.path.is_none() && other.path.is_some() {
self.path = other.path.clone();
self.path.clone_from(&other.path);
}
if self.arch.is_none() && other.arch.is_some() {
self.arch = other.arch.clone();
self.arch.clone_from(&other.arch);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions samply/src/linux_shared/convert_regs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use linux_perf_event_reader::Regs;
pub trait ConvertRegs {
type UnwindRegs;
fn convert_regs(regs: &Regs) -> (u64, u64, Self::UnwindRegs);

#[allow(unused)]
fn regs_mask() -> u64;
}

Expand Down
7 changes: 0 additions & 7 deletions samply/src/mac/proc_maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ use super::task_profiler::UnwindSectionBytes;

pub const TASK_DYLD_INFO_COUNT: mach_msg_type_number_t = 5;

#[derive(Debug, Clone)]
pub struct ThreadInfo {
pub tid: u64,
pub name: String,
pub backtrace: Option<Vec<u64>>,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DyldInfo {
pub is_executable: bool,
Expand Down
14 changes: 0 additions & 14 deletions samply/src/shared/unresolved_samples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,6 @@ pub struct OtherEventMarkerData {
pub attr_index: usize,
}

#[derive(Debug, Clone)]
pub struct SchedSwitchMarkerData {
pub pid: i32,
pub tid: i32,
}

#[derive(Debug, Clone)]
pub struct UnresolvedRssStatMarker {
pub thread_handle: ThreadHandle,
pub timestamp: Timestamp,
pub timestamp_mono: u64,
pub stack: UnresolvedStackHandle,
}

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub struct UnresolvedStackHandle(u32);

Expand Down