WIP save tracing #391
Annotations
28 errors and 2 warnings
creating a mutable reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L397
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:397:9
|
397 | CB.take();
| ^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L368
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:368:14
|
368 | (CB.as_mut().unwrap())(rip);
| ^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L620
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:620:19
|
620 | drop(unsafe { LOG_GUARD.take() });
| ^^^^^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L583
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:583:40
|
583 | save(&slot, std::mem::take(&mut OPS));
| ^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
help: use `&raw mut` instead to create a raw pointer
|
583 | save(&slot, std::mem::take(&raw mut OPS));
| ~~~~~~~~
|
creating a mutable reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L579
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:579:13
|
579 | OPS.clear();
| ^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a shared reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L271
error: creating a shared reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:271:40
|
271 | let mut normalized_path = unsafe { SAVES_DIR.as_ref() }?.clone();
| ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
|
creating a mutable reference to mutable static is discouraged:
hook/src/hooks/mod.rs#L121
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:121:17
|
121 | / OPS.push(Op {
122 | | data: if count == 0 {
123 | | vec![]
124 | | } else {
... |
129 | | stack,
130 | | });
| |__________________^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a shared reference to mutable static is discouraged:
hook/src/lib.rs#L129
error: creating a shared reference to mutable static is discouraged
--> hook/src/lib.rs:129:14
|
129 | unsafe { GLOBALS.as_ref().unwrap() }
| ^^^^^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
= note: `-D static-mut-refs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(static_mut_refs)]`
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
hook/src/hooks/mod.rs#L480
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> hook/src/hooks/mod.rs:480:5
|
480 | impl Into<Action<TreeSpan>> for TreeNode {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-D clippy::from-over-into` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::from_over_into)]`
help: replace the `Into` implementation with `From<hooks::save::TreeNode>`
|
480 ~ impl From<TreeNode> for Action<TreeSpan> {
481 ~ fn from(val: TreeNode) -> Self {
482 ~ match val {
|
|
redundant closure:
hook/src/hooks/mod.rs#L463
error: redundant closure
--> hook/src/hooks/mod.rs:463:51
|
463 | base64::decode(base64.as_bytes()).map_err(|e| serde::de::Error::custom(e))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `serde::de::Error::custom`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
|
manual `RangeInclusive::contains` implementation:
hook/src/hooks/mod.rs#L110
error: manual `RangeInclusive::contains` implementation
--> hook/src/hooks/mod.rs:110:24
|
110 | if ip >= 0x140000000 && ip <= 0x14f000000 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x140000000..=0x14f000000).contains(&ip)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `-D clippy::manual-range-contains` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_range_contains)]`
|
function `deserialize` is never used:
hook/src/hooks/mod.rs#L461
error: function `deserialize` is never used
--> hook/src/hooks/mod.rs:461:12
|
461 | pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Vec<u8>, D::Error> {
| ^^^^^^^^^^^
|
function `main` is never used:
hook/src/hooks/mod.rs#L401
error: function `main` is never used
--> hook/src/hooks/mod.rs:401:8
|
401 | fn main() {
| ^^^^
|
function `hook` is never used:
hook/src/hooks/mod.rs#L378
error: function `hook` is never used
--> hook/src/hooks/mod.rs:378:19
|
378 | pub unsafe fn hook<C, F, R>(
| ^^^^
|
static `CB` is never used:
hook/src/hooks/mod.rs#L377
error: static `CB` is never used
--> hook/src/hooks/mod.rs:377:16
|
377 | static mut CB: Option<Box<dyn FnMut(u64) -> ()>> = None;
| ^^
|
function `exception_handler` is never used:
hook/src/hooks/mod.rs#L359
error: function `exception_handler` is never used
--> hook/src/hooks/mod.rs:359:35
|
359 | pub unsafe extern "system" fn exception_handler(
| ^^^^^^^^^^^^^^^^^
|
function `remove_hardware_breakpoint` is never used:
hook/src/hooks/mod.rs#L343
error: function `remove_hardware_breakpoint` is never used
--> hook/src/hooks/mod.rs:343:19
|
343 | pub unsafe fn remove_hardware_breakpoint() -> Result<(), Box<dyn std::error::Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
function `set_hardware_breakpoint` is never used:
hook/src/hooks/mod.rs#L324
error: function `set_hardware_breakpoint` is never used
--> hook/src/hooks/mod.rs:324:19
|
324 | pub unsafe fn set_hardware_breakpoint(
| ^^^^^^^^^^^^^^^^^^^^^^^
|
constant `HW_BREAKPOINT_TYPE_WRITE` is never used:
hook/src/hooks/mod.rs#L322
error: constant `HW_BREAKPOINT_TYPE_WRITE` is never used
--> hook/src/hooks/mod.rs:322:11
|
322 | const HW_BREAKPOINT_TYPE_WRITE: u64 = 0b01;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
constant `HW_BREAKPOINT_LEN_1` is never used:
hook/src/hooks/mod.rs#L321
error: constant `HW_BREAKPOINT_LEN_1` is never used
--> hook/src/hooks/mod.rs:321:11
|
321 | const HW_BREAKPOINT_LEN_1: u64 = 0b00;
| ^^^^^^^^^^^^^^^^^^^
|
variant `Seek` is never constructed:
hook/src/hooks/mod.rs#L443
error: variant `Seek` is never constructed
--> hook/src/hooks/mod.rs:443:5
|
441 | pub enum Action<S> {
| ------ variant in this enum
442 | Read(usize),
443 | Seek(usize),
| ^^^^
|
= note: `Action` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
use of deprecated function `base64::decode`: Use Engine::decode:
hook/src/hooks/mod.rs#L463
error: use of deprecated function `base64::decode`: Use Engine::decode
--> hook/src/hooks/mod.rs:463:17
|
463 | base64::decode(base64.as_bytes()).map_err(|e| serde::de::Error::custom(e))
| ^^^^^^
|
use of deprecated function `base64::encode`: Use Engine::encode:
hook/src/hooks/mod.rs#L457
error: use of deprecated function `base64::encode`: Use Engine::encode
--> hook/src/hooks/mod.rs:457:30
|
457 | let base64 = base64::encode(v);
| ^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(deprecated)]`
|
unneeded unit return type:
hook/src/hooks/mod.rs#L387
error: unneeded unit return type
--> hook/src/hooks/mod.rs:387:34
|
387 | let r: Box<dyn FnMut(u64) -> ()> = Box::new(cb);
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
|
unneeded unit return type:
hook/src/hooks/mod.rs#L384
error: unneeded unit return type
--> hook/src/hooks/mod.rs:384:22
|
384 | C: FnMut(u64) -> (),
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
|
unneeded unit return type:
hook/src/hooks/mod.rs#L377
error: unneeded unit return type
--> hook/src/hooks/mod.rs:377:45
|
377 | static mut CB: Option<Box<dyn FnMut(u64) -> ()>> = None;
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `-D clippy::unused-unit` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unused_unit)]`
|
unused imports: `HashMap` and `HashSet`:
hook/src/hooks/mod.rs#L6
error: unused imports: `HashMap` and `HashSet`
--> hook/src/hooks/mod.rs:6:19
|
6 | collections::{HashMap, HashSet},
| ^^^^^^^ ^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
check
Clippy had exited with the 101 exit code
|
check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
check
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|