Skip to content

Commit

Permalink
cleanup most warnings in the build
Browse files Browse the repository at this point in the history
the two remaining ones look like ... perhaps actual structural
flaws in Ring, so it's something to contemplate how to fix.
  • Loading branch information
bunnie committed Feb 11, 2024
1 parent 197c382 commit 5f86cb1
Show file tree
Hide file tree
Showing 13 changed files with 1,610 additions and 1,572 deletions.
468 changes: 234 additions & 234 deletions src/c2rust/aes_nohw.rs

Large diffs are not rendered by default.

1,726 changes: 863 additions & 863 deletions src/c2rust/curve25519.rs

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/c2rust/ecp_nistz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ pub type crypto_word_t = uint32_t;
pub type Limb = crypto_word_t;
#[no_mangle]
pub unsafe extern "C" fn little_endian_bytes_from_scalar(
mut str: *mut uint8_t,
mut str_len: size_t,
mut scalar: *const Limb,
mut num_limbs: size_t,
str: *mut uint8_t,
str_len: size_t,
scalar: *const Limb,
num_limbs: size_t,
) {
if str_len
== num_limbs
Expand All @@ -40,7 +40,7 @@ pub unsafe extern "C" fn little_endian_bytes_from_scalar(
.as_ptr(),
);
}
let mut i: size_t = 0;
let mut i: size_t;
i = 0 as core::ffi::c_int as size_t;
while i < num_limbs.wrapping_mul(core::mem::size_of::<Limb>() as u32) {
let mut d: Limb =
Expand Down
12 changes: 6 additions & 6 deletions src/c2rust/gfp_p256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ static mut N_N0: [BN_ULONG; 2] = [
];
#[no_mangle]
pub unsafe extern "C" fn p256_scalar_mul_mont(
mut r: *mut Limb,
mut a: *const Limb,
mut b: *const Limb,
r: *mut Limb,
a: *const Limb,
b: *const Limb,
) {
bn_mul_mont(
r,
Expand All @@ -49,9 +49,9 @@ pub unsafe extern "C" fn p256_scalar_mul_mont(
}
#[no_mangle]
pub unsafe extern "C" fn p256_scalar_sqr_rep_mont(
mut r: *mut Limb,
mut a: *const Limb,
mut rep: Limb,
r: *mut Limb,
a: *const Limb,
rep: Limb,
) {
p256_scalar_mul_mont(r, a, a);
let mut i: Limb = 1 as core::ffi::c_int as Limb;
Expand Down
Loading

0 comments on commit 5f86cb1

Please sign in to comment.