Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ledger_device_sdk/src/ecc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl<const N: usize, const TY: char> ECPrivateKey<N, TY> {
/// [here](https://blog.rust-lang.org/inside-rust/2021/09/06/Splitting-const-generics.html#featuregeneric_const_exprs)
pub fn public_key(&self) -> Result<ECPublicKey<{ Self::P }, TY>, CxError>
where
[(); Self::P]:,
[(); Self::P]: Sized,
{
let mut pubkey = ECPublicKey::<{ Self::P }, TY>::new(self.curve);
let err = unsafe {
Expand Down
2 changes: 1 addition & 1 deletion ledger_device_sdk/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ impl Comm {
G_ux_params.u.pairing_request.pairing_info_len = (_len - 2) as u32;
for i in 0..G_ux_params.u.pairing_request.pairing_info_len as usize {
G_ux_params.u.pairing_request.pairing_info[i as usize] =
seph_buffer[5 + i] as i8;
seph_buffer[5 + i] as core::ffi::c_char;
}
G_ux_params.u.pairing_request.pairing_info
[G_ux_params.u.pairing_request.pairing_info_len as usize] = 0;
Expand Down
8 changes: 4 additions & 4 deletions ledger_device_sdk/src/libcall/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ pub fn get_check_address_params<

debug_print("==> GET_REF_ADDRESS\n");
let mut address_length = 0usize;
let mut c = unsafe { *(params.address_to_check.add(address_length)) };
while c != '\0' as i8 && address_length < ADDRESS_BUF_SIZE {
let mut c: core::ffi::c_char = unsafe { *(params.address_to_check.add(address_length)) };
while c != '\0' as core::ffi::c_char && address_length < ADDRESS_BUF_SIZE {
check_address_params.ref_address[address_length] = c as u8;
address_length += 1;
c = unsafe { *(params.address_to_check.add(address_length)) };
Expand Down Expand Up @@ -224,7 +224,7 @@ pub fn get_printable_amount_params<
debug_print("==> GET_AMOUNT_STR\n");
printable_amount_params.amount_str = unsafe {
&(*(libarg.__bindgen_anon_1.get_printable_amount as *mut get_printable_amount_parameters_t))
.printable_amount as *const i8 as *mut i8
.printable_amount as *const core::ffi::c_char as *mut i8
};

printable_amount_params
Expand Down Expand Up @@ -285,7 +285,7 @@ pub fn sign_tx_params<const COIN_CONFIG_BUF_SIZE: usize, const ADDRESS_BUF_SIZE:
debug_print("==> GET_DESTINATION_ADDRESS\n");
let mut dest_address_length = 0usize;
let mut c = unsafe { *params.destination_address.add(dest_address_length) };
while c != '\0' as i8 && dest_address_length < ADDRESS_BUF_SIZE {
while c != '\0' as ::core::ffi::c_char && dest_address_length < ADDRESS_BUF_SIZE {
create_tx_params.dest_address[dest_address_length] = c as u8;
dest_address_length += 1;
c = unsafe { *params.destination_address.add(dest_address_length) };
Expand Down
4 changes: 2 additions & 2 deletions ledger_device_sdk/src/nbgl/nbgl_review.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ impl<'a> NbglReview<'a> {
let mut tag_value_array: Vec<nbgl_contentTagValue_t> = Vec::new();
for field in v.iter() {
let val = nbgl_contentTagValue_t {
item: field.name.as_ptr() as *const i8,
value: field.value.as_ptr() as *const i8,
item: field.name.as_ptr() as *const ::core::ffi::c_char,
value: field.value.as_ptr() as *const ::core::ffi::c_char,
..Default::default()
};
tag_value_array.push(val);
Expand Down
4 changes: 2 additions & 2 deletions ledger_device_sdk/src/nbgl/nbgl_streaming_review.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ impl NbglStreamingReview {
let mut tag_value_array: Vec<nbgl_contentTagValue_t> = Vec::new();
for field in v.iter() {
let val = nbgl_contentTagValue_t {
item: field.name.as_ptr() as *const i8,
value: field.value.as_ptr() as *const i8,
item: field.name.as_ptr() as *const ::core::ffi::c_char,
value: field.value.as_ptr() as *const ::core::ffi::c_char,
..Default::default()
};
tag_value_array.push(val);
Expand Down
1 change: 1 addition & 0 deletions ledger_secure_sdk_sys/devices/apex_p/apex_p.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"linker": "link_wrap.sh",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv8m.main-none-eabi",
"llvm-floatabi": "soft",
"max-atomic-width": 32,
"panic-strategy": "abort",
"pre-link-args": {
Expand Down
1 change: 1 addition & 0 deletions ledger_secure_sdk_sys/devices/flex/flex.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"linker": "link_wrap.sh",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv8m.main-none-eabi",
"llvm-floatabi": "soft",
"max-atomic-width": 32,
"panic-strategy": "abort",
"pre-link-args": {
Expand Down
1 change: 1 addition & 0 deletions ledger_secure_sdk_sys/devices/nanosplus/nanosplus.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"linker": "link_wrap.sh",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv8m.main-none-eabi",
"llvm-floatabi": "soft",
"max-atomic-width": 32,
"panic-strategy": "abort",
"pre-link-args": {
Expand Down
1 change: 1 addition & 0 deletions ledger_secure_sdk_sys/devices/nanox/nanox.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"linker": "link_wrap.sh",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv6m-none-eabi",
"llvm-floatabi": "soft",
"panic-strategy": "abort",
"pre-link-args": {
"ld.lld": [
Expand Down
1 change: 1 addition & 0 deletions ledger_secure_sdk_sys/devices/stax/stax.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"linker": "link_wrap.sh",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv8m.main-none-eabi",
"llvm-floatabi": "soft",
"max-atomic-width": 32,
"panic-strategy": "abort",
"pre-link-args": {
Expand Down
1 change: 1 addition & 0 deletions ledger_secure_sdk_sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(unnecessary_transmutes)]

use core::ffi::c_void;
#[cfg(all(feature = "heap"))]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-12-01"
channel = "nightly"
Loading