From 5ed76afa814812edaeaff2ea7b3227c18d5de5a6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 4 Aug 2020 12:29:59 +0200 Subject: pkg/compiler: check for unused resources If a resource is never used as an input, it is not useful. It's effectively the same as using an integer. Detect such cases, they are quite confusing. Fix all existing errors in descriptions. This uncovered some interesting bugs as well, e.g. use of a completely unrelated fd subtype after copy-paste (while the resource that was supposed to be used there is completely unused). --- sys/openbsd/dev_speaker.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/openbsd/dev_speaker.txt') diff --git a/sys/openbsd/dev_speaker.txt b/sys/openbsd/dev_speaker.txt index 9da2c2253..9cffbc745 100644 --- a/sys/openbsd/dev_speaker.txt +++ b/sys/openbsd/dev_speaker.txt @@ -11,8 +11,8 @@ resource fd_speaker[fd] openat$speaker(fd const[AT_FDCWD], file ptr[in, string["/dev/speaker"]], flags flags[open_flags], mode const[0]) fd_speaker -ioctl$SPKRTONE(fd fd_diskmap, cmd const[SPKRTONE], arg ptr[in, tone]) -ioctl$SPKRTUNE(fd fd_diskmap, cmd const[SPKRTUNE], arg ptr[in, tone]) +ioctl$SPKRTONE(fd fd_speaker, cmd const[SPKRTONE], arg ptr[in, tone]) +ioctl$SPKRTUNE(fd fd_speaker, cmd const[SPKRTUNE], arg ptr[in, tone]) tone { frequency int32 -- cgit mrf-deployment