From edbf07f9148e61d1d8b8a23175b81dee0383b0a5 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Mon, 18 Mar 2019 21:36:57 +0800 Subject: [PATCH] Add #[deny(warnings)] to syscall dispatch. See https://github.com/oscourse-tsinghua/rcore_plus/commit/17e644e54e494835f1a49b34b80c2c4f15ed0dbe for discussion --- kernel/src/syscall/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/src/syscall/mod.rs b/kernel/src/syscall/mod.rs index c29f1f0..f324f31 100644 --- a/kernel/src/syscall/mod.rs +++ b/kernel/src/syscall/mod.rs @@ -32,6 +32,9 @@ mod misc; mod custom; /// System call dispatcher +// This #[deny(unreachable_patterns)] checks if each match arm is defined +// See discussion in https://github.com/oscourse-tsinghua/rcore_plus/commit/17e644e54e494835f1a49b34b80c2c4f15ed0dbe. +#[deny(unreachable_patterns)] pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize { let cid = cpu::id(); let pid = {