Skip to content

Commit 7833ead

Browse files
committed
Allow warning (stack-reorder-contract)
1 parent 5642256 commit 7833ead

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stack-reorder-contract/src/main.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ ckb_std::entry!(program_entry);
1111
#[cfg(not(test))]
1212
default_alloc!();
1313

14+
#[allow(unused_variables, unused_assignments)]
1415
pub fn program_entry() -> i8 {
15-
let mut _x: u64;
16+
let mut x: u64;
1617
unsafe {
1718
core::arch::asm!(
18-
"mv {_x}, sp",
19-
_x = out(reg) _x,
19+
"mv {x}, sp",
20+
x = out(reg) x,
2021
);
2122
}
2223

23-
ckb_std::debug!("Current SP is {:x}", _x);
24+
ckb_std::debug!("Current SP is {:x}", x);
2425

2526
0
2627
}

0 commit comments

Comments
 (0)