Skip to content

Commit 32dc2ea

Browse files
authored
Merge pull request rust-lang#334 from fiveop/literal_overflow_warning
Cast unsigned literals to signed integers.
2 parents 16f3a8e + 5a68b6a commit 32dc2ea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,13 @@ pub const LOG_NFACILITIES: ::c_int = 24;
468468

469469
pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
470470

471-
pub const RB_AUTOBOOT: ::c_int = 0x01234567;
472-
pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123;
473-
pub const RB_ENABLE_CAD: ::c_int = 0x89abcdef;
474-
pub const RB_DISABLE_CAD: ::c_int = 0;
475-
pub const RB_POWER_OFF: ::c_int = 0x4321fedc;
476-
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2;
477-
pub const RB_KEXEC: ::c_int = 0x45584543;
471+
pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
472+
pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
473+
pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
474+
pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
475+
pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
476+
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
477+
pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
478478

479479
f! {
480480
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {

0 commit comments

Comments
 (0)