sapemu: Broken sbc #698
Annotations
9 errors and 22 warnings
literal out of range for `u16`:
sapemu/src/smp/ops.rs#L2028
error: literal out of range for `u16`
--> sapemu/src/smp/ops.rs:2028:61
|
2028 | cpu.psw.set(ProgramStatusWord::Carry, expanded_result >= 0x1_0000);
| ^^^^^^^^
|
= note: the literal `0x1_0000` (decimal `65536`) does not fit into the type `u16` and will become `0u16`
= help: consider using the type `u32` instead
= note: `#[deny(overflowing_literals)]` on by default
|
casts from `bool` to `u8` can be expressed infallibly using `From`:
sapemu/src/smp.rs#L462
error: casts from `bool` to `u8` can be expressed infallibly using `From`
--> sapemu/src/smp.rs:462:57
|
462 | let half_carry_result = (op1 & 0x0f) + (op2 & 0x0f) + self.carry() as u8 >= 0x10;
| ^^^^^^^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: `-D clippy::cast-lossless` implied by `-D clippy::pedantic`
= help: to override `-D clippy::pedantic` add `#[allow(clippy::cast_lossless)]`
help: use `u8::from` instead
|
462 | let half_carry_result = (op1 & 0x0f) + (op2 & 0x0f) + u8::from(self.carry()) >= 0x10;
| ~~~~~~~~~~~~~~~~~~~~~~
|
because of the numeric bounds on `result` prior to casting, this expression is always false:
sapemu/src/smp/ops.rs#L2026
error: because of the numeric bounds on `result` prior to casting, this expression is always false
--> sapemu/src/smp/ops.rs:2026:41
|
2026 | cpu.psw.set(ProgramStatusWord::Sign, (result as i16) < 0);
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#invalid_upcast_comparisons
= note: `-D clippy::invalid-upcast-comparisons` implied by `-D clippy::pedantic`
= help: to override `-D clippy::pedantic` add `#[allow(clippy::invalid_upcast_comparisons)]`
|
this operation has no effect:
sapemu/src/smp/ops.rs#L1969
error: this operation has no effect
--> sapemu/src/smp/ops.rs:1969:12
|
1969 | cpu.y = (modulus & 0xff) as u8;
| ^^^^^^^^^^^^^^^^ help: consider reducing it to: `modulus`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
|
casting to the same type is unnecessary (`u8` -> `u8`):
sapemu/src/smp/ops.rs#L1969
error: casting to the same type is unnecessary (`u8` -> `u8`)
--> sapemu/src/smp/ops.rs:1969:12
|
1969 | cpu.y = (modulus & 0xff) as u8;
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(modulus & 0xff)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
this operation has no effect:
sapemu/src/smp/ops.rs#L1968
error: this operation has no effect
--> sapemu/src/smp/ops.rs:1968:12
|
1968 | cpu.a = (div & 0xff) as u8;
| ^^^^^^^^^^^^ help: consider reducing it to: `div`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
|
casting to the same type is unnecessary (`u8` -> `u8`):
sapemu/src/smp/ops.rs#L1968
error: casting to the same type is unnecessary (`u8` -> `u8`)
--> sapemu/src/smp/ops.rs:1968:12
|
1968 | cpu.a = (div & 0xff) as u8;
| ^^^^^^^^^^^^^^^^^^ help: try: `(div & 0xff)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-D clippy::unnecessary-cast` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::unnecessary_cast)]`
|
this operation has no effect:
sapemu/src/smp/ops.rs#L1965
error: this operation has no effect
--> sapemu/src/smp/ops.rs:1965:42
|
1965 | cpu.psw.set(ProgramStatusWord::Sign, ((div & 0xff) as i8) < 0);
| ^^^^^^^^^^^^ help: consider reducing it to: `div`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `-D clippy::identity-op` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::identity_op)]`
|
clippy
Clippy had exited with the 101 exit code
|
fmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
fmt
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
fmt
The process '/usr/bin/git' failed with exit code 128
|
fmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
fmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
fmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
fmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
build
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
build
The process '/usr/bin/git' failed with exit code 128
|
comparison is useless due to type limits:
sapemu/src/smp/ops.rs#L2028
warning: comparison is useless due to type limits
--> sapemu/src/smp/ops.rs:2028:42
|
2028 | cpu.psw.set(ProgramStatusWord::Carry, expanded_result >= 0x1_0000);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_comparisons)]` on by default
|
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1.0.7. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1, actions-rs/clippy-check@v1.0.7. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy
The process '/usr/bin/git' failed with exit code 128
|