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/windows/sys.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/windows') diff --git a/sys/windows/sys.txt b/sys/windows/sys.txt index 66549f6ec..cc24f47f5 100644 --- a/sys/windows/sys.txt +++ b/sys/windows/sys.txt @@ -4,12 +4,11 @@ include resource HANDLE[intptr]: INVALID_HANDLE_VALUE -resource hFile[HANDLE] syz_execute_func(text ptr[in, text[target]]) CloseHandle(hObject HANDLE) -CreateFileA(lpFileName ptr[in, filename], dwDesiredAccess flags[file_access_rights], dwShareMode flags[file_share_mode], lpSecurityAttributes ptr[in, SECURITY_ATTRIBUTES, opt], dwCreationDisposition flags[file_create_disposition], dwFlagsAndAttributes flags[file_attributes], hTemplateFile HANDLE[opt]) hFile +CreateFileA(lpFileName ptr[in, filename], dwDesiredAccess flags[file_access_rights], dwShareMode flags[file_share_mode], lpSecurityAttributes ptr[in, SECURITY_ATTRIBUTES, opt], dwCreationDisposition flags[file_create_disposition], dwFlagsAndAttributes flags[file_attributes], hTemplateFile HANDLE[opt]) HANDLE VirtualAlloc(lpAddress vma, dwSize len[lpAddress], flAllocationType flags[allocation_type], flProtect flags[protect_flags]) SECURITY_ATTRIBUTES { -- cgit mrf-deployment