-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
Encountered while building the Deltachat-rpc-server:
error[E0308]: mismatched types
--> /wrkdirs/usr/ports/net/deltachat-rpc-server/work/core-1.159.3/cargo-crates/netdev-0.31.0/src/interface/unix.rs:192:28
|
192 | let nlen: i8 = (*sa).sa_data[3];
| -- ^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
| |
| expected due to this
|
help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
|
192 | let nlen: i8 = (*sa).sa_data[3].try_into().unwrap();
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /wrkdirs/usr/ports/net/deltachat-rpc-server/work/core-1.159.3/cargo-crates/netdev-0.31.0/src/interface/unix.rs:193:28
|
193 | let alen: i8 = (*sa).sa_data[4];
| -- ^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
| |
| expected due to this
|
help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
|
193 | let alen: i8 = (*sa).sa_data[4].try_into().unwrap();
| ++++++++++++++++++++
The arm64 API defines char as unsigned which I believe is the root cause here: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#10arm-c-and-c-language-mappings
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels