Jacek Caban : kernel32: Remove no longer used variables.
Alexandre Julliard
julliard at winehq.org
Wed Dec 2 15:21:07 CST 2020
Module: wine
Branch: master
Commit: 90911216699ccbf11848af79b2f7ecb206d9d289
URL: https://source.winehq.org/git/wine.git/?a=commit;h=90911216699ccbf11848af79b2f7ecb206d9d289
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Dec 2 17:43:42 2020 +0100
kernel32: Remove no longer used variables.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/kernel_main.c | 1 -
dlls/kernel32/kernel_private.h | 4 ----
dlls/kernel32/path.c | 8 +++++---
dlls/kernel32/process.c | 4 ----
4 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index e312a202db6..89394e16430 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -120,7 +120,6 @@ static void copy_startup_info(void)
*/
static BOOL process_attach( HMODULE module )
{
- kernel32_handle = module;
RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter );
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h
index 7602c3b00c4..633511d6140 100644
--- a/dlls/kernel32/kernel_private.h
+++ b/dlls/kernel32/kernel_private.h
@@ -29,12 +29,8 @@ static inline BOOL set_ntstatus( NTSTATUS status )
return !status;
}
-extern HMODULE kernel32_handle DECLSPEC_HIDDEN;
extern SYSTEM_BASIC_INFORMATION system_info DECLSPEC_HIDDEN;
-extern const WCHAR DIR_Windows[] DECLSPEC_HIDDEN;
-extern const WCHAR DIR_System[] DECLSPEC_HIDDEN;
-
extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc ) DECLSPEC_HIDDEN;
extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen ) DECLSPEC_HIDDEN;
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index 8b4158b29d6..023dff826d6 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -40,6 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(file);
#define MAX_PATHNAME_LEN 1024
+static const WCHAR system_dir[] = L"C:\\windows\\system32";
+
/***********************************************************************
* copy_filename_WtoA
*
@@ -232,10 +234,10 @@ BOOL WINAPI CreateDirectoryExA( LPCSTR template, LPCSTR path, LPSECURITY_ATTRIBU
*/
UINT WINAPI GetSystemDirectoryW( LPWSTR path, UINT count )
{
- UINT len = lstrlenW( DIR_System ) + 1;
+ UINT len = ARRAY_SIZE(system_dir);
if (path && count >= len)
{
- lstrcpyW( path, DIR_System );
+ lstrcpyW( path, system_dir );
len--;
}
return len;
@@ -249,7 +251,7 @@ UINT WINAPI GetSystemDirectoryW( LPWSTR path, UINT count )
*/
UINT WINAPI GetSystemDirectoryA( LPSTR path, UINT count )
{
- return copy_filename_WtoA( DIR_System, path, count );
+ return copy_filename_WtoA( system_dir, path, count );
}
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index c2df0ccd658..92582ae31de 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -49,12 +49,8 @@ typedef struct
DWORD dwReserved;
} LOADPARMS32;
-HMODULE kernel32_handle = 0;
SYSTEM_BASIC_INFORMATION system_info = { 0 };
-const WCHAR DIR_Windows[] = L"C:\\windows";
-const WCHAR DIR_System[] = L"C:\\windows\\system32";
-
/* Process flags */
#define PDB32_DEBUGGED 0x0001 /* Process is being debugged */
#define PDB32_WIN16_PROC 0x0008 /* Win16 process */
More information about the wine-cvs
mailing list