Skip to content

Commit

Permalink
Merge pull request #530 from Freax13/fix/warnings-2025-01-19
Browse files Browse the repository at this point in the history
fix warnings & remove broken CI job
  • Loading branch information
phil-opp authored Jan 19, 2025
2 parents 59ac07c + 1d1bcc2 commit a675195
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-12, macos-latest, windows-latest]
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion src/registers/segmentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl SegmentSelector {
/// * `rpl`: the requested privilege level
#[inline]
pub const fn new(index: u16, rpl: PrivilegeLevel) -> SegmentSelector {
SegmentSelector(index << 3 | (rpl as u16))
SegmentSelector((index << 3) | (rpl as u16))
}

/// Can be used as a selector into a non-existent segment and assigned to segment registers,
Expand Down
2 changes: 1 addition & 1 deletion src/registers/xcontrol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mod x86_64 {
out("rax") low, out("rdx") high,
options(nomem, nostack, preserves_flags),
);
(high as u64) << 32 | (low as u64)
((high as u64) << 32) | (low as u64)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/structures/idt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,8 @@ impl<F> Entry<F> {
#[inline]
pub fn handler_addr(&self) -> VirtAddr {
let addr = self.pointer_low as u64
| (self.pointer_middle as u64) << 16
| (self.pointer_high as u64) << 32;
| ((self.pointer_middle as u64) << 16)
| ((self.pointer_high as u64) << 32);
// addr is a valid VirtAddr, as the pointer members are either all zero,
// or have been set by set_handler_addr (which takes a VirtAddr).
VirtAddr::new_truncate(addr)
Expand Down

0 comments on commit a675195

Please sign in to comment.