rivosinc / salus

Risc-V hypervisor for TEE development
92 stars 25 forks source link

build: Fix clippy issue #298

Closed sboeuf closed 1 year ago

sboeuf commented 1 year ago

Resolves following clippy warning:

warning: variable does not need to be mutable                                                
   --> src/trap.rs:209:9                                                                     
    |                                                                                        
209 |     let mut tf = unsafe { tf_ptr.as_mut().unwrap() };                                  
    |         ----^^                                                                         
    |         |                                                                              
    |         help: remove this `mut`                                                        
    |                                                                                        
    = note: `#[warn(unused_mut)]` on by default                                              

warning: 1 warning emitted
abrestic-rivos commented 1 year ago

hm, why didn't CI catch this?

sboeuf commented 1 year ago

hm, why didn't CI catch this?

Yeah that's a shame it didn't. That's because we need to pass some extra flags to bazel clippy if we want warnings to be treated as errors. Fingers crossed this is something bazel supports.

glg-rv commented 1 year ago

We seem to have lost check for warnings in the move to bazel?

Sorry, passed my usual pre-commit tests because no errors were raised.

sboeuf commented 1 year ago

We seem to have lost check for warnings in the move to bazel?

Sorry, passed my usual pre-commit tests because no errors were raised.

No worries at all, I really hope we can find out how to re-enable this treat warnings as errors in bazel.