Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
iKapitonau committed Aug 8, 2024
1 parent 12ed233 commit 63327a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions cosmwasm/enclaves/shared/utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![feature(btree_drain_filter)]
#![allow(unused_imports)]

extern crate sgx_trts;
extern crate sgx_types;
Expand Down
1 change: 1 addition & 0 deletions cosmwasm/enclaves/shared/utils/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use log::*;
use log::{error, info};
use std::io::{Read, Write};
use std::path::Path;
use std::untrusted::path::PathEx;
use std::ptr;
use std::sgxfs::SgxFile;
use std::slice;
Expand Down
9 changes: 4 additions & 5 deletions cosmwasm/packages/sgx-vm/src/attestation_dcap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,8 @@ fn sgx_ql_qve_collateral_serialize(
x.qe_identity_size as usize,
);
}

return out_size;
};
out_size
}
}

fn sgx_ql_qve_collateral_deserialize(p_ser: *const u8, n_ser: u32) -> sgx_ql_qve_collateral_t {
Expand Down Expand Up @@ -241,7 +240,7 @@ fn sgx_ql_qve_collateral_deserialize(p_ser: *const u8, n_ser: u32) -> sgx_ql_qve
}
};

return res; // unreachable
res // unreachable
}

#[cfg(not(test))]
Expand All @@ -253,7 +252,7 @@ pub extern "C" fn ocall_get_quote_ecdsa_collateral(
n_col: u32,
p_col_size: *mut u32,
) -> sgx_status_t {
let mut p_col_my: *mut u8 = 0 as *mut u8;
let mut p_col_my: *mut u8 = std::ptr::null_mut::<u8>();
let mut n_col_my: u32 = 0;

let ret = unsafe { tee_qv_get_collateral(p_quote, n_quote, &mut p_col_my, &mut n_col_my) };
Expand Down

0 comments on commit 63327a2

Please sign in to comment.