Skip to content

Commit

Permalink
Fixed two warnings in the build
Browse files Browse the repository at this point in the history
  • Loading branch information
john-sharratt authored and Detegr committed Apr 23, 2022
1 parent f585c89 commit 64d1d93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -89,7 +89,7 @@ pub fn set_handler<F>(mut user_handler: F) -> Result<(), Error>
where
F: FnMut() -> () + 'static + Send,
{
if INIT.compare_and_swap(false, true, Ordering::SeqCst) {
if INIT.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst).map_or_else(|e| e, |a| a) {
return Err(Error::MultipleHandlers);
}

Expand Down
1 change: 1 addition & 0 deletions src/platform/unix/mod.rs
Expand Up @@ -99,6 +99,7 @@ pub unsafe fn init_os_handler() -> Result<(), Error> {
signal::SigSet::empty(),
);

#[allow(unused_variables)]
let sigint_old = match signal::sigaction(signal::Signal::SIGINT, &new_action) {
Ok(old) => old,
Err(e) => return Err(close_pipe(e)),
Expand Down

0 comments on commit 64d1d93

Please sign in to comment.