Hello, this patch applies on top of part 1. License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - compile the advapi32 dll with -DSTRICT - fix the "int format, HANDLE arg" type of warnings in the advapi dll bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
diff -ur dlls/advapi32.strict/Makefile.in dlls/advapi32/Makefile.in --- dlls/advapi32.strict/Makefile.in Sat Oct 19 02:31:02 2002 +++ dlls/advapi32/Makefile.in Thu Oct 24 22:19:48 2002 @@ -1,4 +1,4 @@ -EXTRADEFS = -D_ADVAPI32_ -DWINE_NO_STRICT +EXTRADEFS = -D_ADVAPI32_ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff -ur dlls/advapi32.strict/eventlog.c dlls/advapi32/eventlog.c --- dlls/advapi32.strict/eventlog.c Thu Aug 29 21:40:53 2002 +++ dlls/advapi32/eventlog.c Thu Oct 24 21:39:36 2002 @@ -88,7 +88,7 @@ */ BOOL WINAPI DeregisterEventSource( HANDLE hEventLog ) { - FIXME("(%d): stub\n",hEventLog); + FIXME("(%p): stub\n",hEventLog); return TRUE; } diff -ur dlls/advapi32.strict/registry.c dlls/advapi32/registry.c --- dlls/advapi32.strict/registry.c Thu Oct 24 22:04:41 2002 +++ dlls/advapi32/registry.c Thu Oct 24 21:51:35 2002 @@ -101,8 +101,8 @@ if (hkey == HKEY_CURRENT_USER) { - if (RtlOpenCurrentUser( (PHANDLE)access, &hkey )) return 0; - TRACE( "HKEY_CURRENT_USER -> %08x\n", hkey ); + if (RtlOpenCurrentUser( access, (PHANDLE)&hkey )) return 0; + TRACE( "HKEY_CURRENT_USER -> %p\n", hkey ); } else { @@ -115,7 +115,7 @@ attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; if (NtCreateKey( (PHANDLE)&hkey, access, &attr, 0, NULL, 0, NULL )) return 0; - TRACE( "%s -> %08x\n", debugstr_w(attr.ObjectName->Buffer), hkey ); + TRACE( "%s -> %p\n", debugstr_w(attr.ObjectName->Buffer), hkey ); } if (!(ret = (HKEY)InterlockedCompareExchange( (PLONG)&special_root_keys[idx], (LONG)hkey, 0 ))) @@ -381,7 +381,7 @@ KEY_NODE_INFORMATION *info = (KEY_NODE_INFORMATION *)buffer; DWORD total_size; - TRACE( "(0x%x,%ld,%p,%p(%ld),%p,%p,%p,%p)\n", hkey, index, name, name_len, + TRACE( "(%p,%ld,%p,%p(%ld),%p,%p,%p,%p)\n", hkey, index, name, name_len, name_len ? *name_len : -1, reserved, class, class_len, ft ); if (reserved) return ERROR_INVALID_PARAMETER; @@ -443,7 +443,7 @@ KEY_NODE_INFORMATION *info = (KEY_NODE_INFORMATION *)buffer; DWORD total_size; - TRACE( "(0x%x,%ld,%p,%p(%ld),%p,%p,%p,%p)\n", hkey, index, name, name_len, + TRACE( "(%p,%ld,%p,%p(%ld),%p,%p,%p,%p)\n", hkey, index, name, name_len, name_len ? *name_len : -1, reserved, class, class_len, ft ); if (reserved) return ERROR_INVALID_PARAMETER; @@ -548,7 +548,7 @@ KEY_FULL_INFORMATION *info = (KEY_FULL_INFORMATION *)buffer; DWORD total_size; - TRACE( "(0x%x,%p,%ld,%p,%p,%p,%p,%p,%p,%p,%p)\n", hkey, class, class_len ? *class_len : 0, + TRACE( "(%p,%p,%ld,%p,%p,%p,%p,%p,%p,%p,%p)\n", hkey, class, class_len ? *class_len : 0, reserved, subkeys, max_subkey, values, max_value, max_data, security, modif ); if (class && !class_len && is_version_nt()) return ERROR_INVALID_PARAMETER; @@ -610,7 +610,7 @@ LPSTR bufptr = lpValueBuf; *ldwTotsize = 0; - TRACE("(%x,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize); + TRACE("(%p,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize); for(i=0; i < num_vals; ++i) { @@ -654,7 +654,7 @@ LPSTR bufptr = (LPSTR)lpValueBuf; *ldwTotsize = 0; - TRACE("(%x,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize); + TRACE("(%p,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize); for(i=0; i < num_vals; ++i) { @@ -697,7 +697,7 @@ KEY_FULL_INFORMATION *info = (KEY_FULL_INFORMATION *)buffer; DWORD total_size, len; - TRACE( "(0x%x,%p,%ld,%p,%p,%p,%p,%p,%p,%p,%p)\n", hkey, class, class_len ? *class_len : 0, + TRACE( "(%p,%p,%ld,%p,%p,%p,%p,%p,%p,%p,%p)\n", hkey, class, class_len ? *class_len : 0, reserved, subkeys, max_subkey, values, max_value, max_data, security, modif ); if (class && !class_len && is_version_nt()) return ERROR_INVALID_PARAMETER; @@ -940,7 +940,7 @@ HKEY subkey = hkey; DWORD ret; - TRACE("(0x%x,%s,%ld,%s,%ld)\n", hkey, debugstr_w(name), type, debugstr_w(data), count ); + TRACE("(%p,%s,%ld,%s,%ld)\n", hkey, debugstr_w(name), type, debugstr_w(data), count ); if (type != REG_SZ) return ERROR_INVALID_PARAMETER; @@ -964,7 +964,7 @@ HKEY subkey = hkey; DWORD ret; - TRACE("(0x%x,%s,%ld,%s,%ld)\n", hkey, debugstr_a(name), type, debugstr_a(data), count ); + TRACE("(%p,%s,%ld,%s,%ld)\n", hkey, debugstr_a(name), type, debugstr_a(data), count ); if (type != REG_SZ) return ERROR_INVALID_PARAMETER; @@ -1009,7 +1009,7 @@ KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data ); - TRACE("(0x%x,%s,%p,%p,%p,%p=%ld)\n", + TRACE("(%p,%s,%p,%p,%p,%p=%ld)\n", hkey, debugstr_w(name), reserved, type, data, count, count ? *count : 0 ); if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER; @@ -1077,7 +1077,7 @@ KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data ); - TRACE("(0x%x,%s,%p,%p,%p,%p=%ld)\n", + TRACE("(%p,%s,%p,%p,%p,%p=%ld)\n", hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 ); if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER; @@ -1157,7 +1157,7 @@ DWORD ret; HKEY subkey = hkey; - TRACE("(%x,%s,%p,%ld)\n", hkey, debugstr_w(name), data, count ? *count : 0 ); + TRACE("(%p,%s,%p,%ld)\n", hkey, debugstr_w(name), data, count ? *count : 0 ); if (name && name[0]) { @@ -1184,7 +1184,7 @@ DWORD ret; HKEY subkey = hkey; - TRACE("(%x,%s,%p,%ld)\n", hkey, debugstr_a(name), data, count ? *count : 0 ); + TRACE("(%p,%s,%p,%ld)\n", hkey, debugstr_a(name), data, count ? *count : 0 ); if (name && name[0]) { @@ -1226,7 +1226,7 @@ KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION, Name ); - TRACE("(%x,%ld,%p,%p,%p,%p,%p,%p)\n", + TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n", hkey, index, value, val_count, reserved, type, data, count ); /* NT only checks count, not val_count */ @@ -1309,7 +1309,7 @@ KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION, Name ); - TRACE("(%x,%ld,%p,%p,%p,%p,%p,%p)\n", + TRACE("(%p,%ld,%p,%p,%p,%p,%p,%p)\n", hkey, index, value, val_count, reserved, type, data, count ); /* NT only checks count, not val_count */ @@ -1453,7 +1453,7 @@ HANDLE file; DWORD ret, len, err = GetLastError(); - TRACE( "(%x,%s,%s)\n", hkey, debugstr_w(subkey), debugstr_w(filename) ); + TRACE( "(%p,%s,%s)\n", hkey, debugstr_w(subkey), debugstr_w(filename) ); if (!filename || !*filename) return ERROR_INVALID_PARAMETER; if (!subkey || !*subkey) return ERROR_INVALID_PARAMETER; @@ -1494,7 +1494,7 @@ HANDLE file; DWORD ret, len, err = GetLastError(); - TRACE( "(%x,%s,%s)\n", hkey, debugstr_a(subkey), debugstr_a(filename) ); + TRACE( "(%p,%s,%s)\n", hkey, debugstr_a(subkey), debugstr_a(filename) ); if (!filename || !*filename) return ERROR_INVALID_PARAMETER; if (!subkey || !*subkey) return ERROR_INVALID_PARAMETER; @@ -1542,7 +1542,7 @@ DWORD ret, err; HANDLE handle; - TRACE( "(%x,%s,%p)\n", hkey, debugstr_a(file), sa ); + TRACE( "(%p,%s,%p)\n", hkey, debugstr_a(file), sa ); if (!file || !*file) return ERROR_INVALID_PARAMETER; if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; @@ -1609,13 +1609,13 @@ */ LONG WINAPI RegRestoreKeyW( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags ) { - TRACE("(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags); + TRACE("(%p,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags); /* It seems to do this check before the hkey check */ if (!lpFile || !*lpFile) return ERROR_INVALID_PARAMETER; - FIXME("(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags); + FIXME("(%p,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags); /* Check for file existence */ @@ -1644,7 +1644,7 @@ */ LONG WINAPI RegUnLoadKeyW( HKEY hkey, LPCWSTR lpSubKey ) { - FIXME("(%x,%s): stub\n",hkey, debugstr_w(lpSubKey)); + FIXME("(%p,%s): stub\n",hkey, debugstr_w(lpSubKey)); return ERROR_SUCCESS; } @@ -1673,7 +1673,7 @@ LONG WINAPI RegReplaceKeyW( HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpNewFile, LPCWSTR lpOldFile ) { - FIXME("(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), + FIXME("(%p,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), debugstr_w(lpNewFile),debugstr_w(lpOldFile)); return ERROR_SUCCESS; } @@ -1707,7 +1707,7 @@ LONG WINAPI RegSetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInfo, PSECURITY_DESCRIPTOR pSecurityDesc ) { - TRACE("(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc); + TRACE("(%p,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc); /* It seems to perform this check before the hkey check */ if ((SecurityInfo & OWNER_SECURITY_INFORMATION) || @@ -1721,7 +1721,7 @@ if (!pSecurityDesc) return ERROR_INVALID_PARAMETER; - FIXME(":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc); + FIXME(":(%p,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc); return ERROR_SUCCESS; } @@ -1745,7 +1745,7 @@ PSECURITY_DESCRIPTOR pSecurityDescriptor, LPDWORD lpcbSecurityDescriptor ) { - TRACE("(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor, + TRACE("(%p,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor, lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); /* FIXME: Check for valid SecurityInformation values */ @@ -1753,7 +1753,7 @@ if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR)) return ERROR_INSUFFICIENT_BUFFER; - FIXME("(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation, + FIXME("(%p,%ld,%p,%ld): stub\n",hkey,SecurityInformation, pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); /* Do not leave security descriptor filled with garbage */ @@ -1779,7 +1779,7 @@ */ DWORD WINAPI RegFlushKey( HKEY hkey ) { - FIXME( "(%x): stub\n", hkey ); + FIXME( "(%p): stub\n", hkey ); return ERROR_SUCCESS; } @@ -1795,7 +1795,7 @@ LONG WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey, PHKEY phkResult ) { - TRACE("(%s,%x,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult); + TRACE("(%s,%p,%p): stub\n",debugstr_w(lpMachineName),hKey,phkResult); if (!lpMachineName || !*lpMachineName) { /* Use the local machine name */ @@ -1833,7 +1833,7 @@ DWORD fdwNotifyFilter, HANDLE hEvent, BOOL fAsync ) { - FIXME("(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter, + FIXME("(%p,%i,%ld,%p,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter, hEvent,fAsync); return ERROR_SUCCESS; } diff -ur dlls/advapi32.strict/security.c dlls/advapi32/security.c --- dlls/advapi32.strict/security.c Wed Oct 23 22:32:16 2002 +++ dlls/advapi32/security.c Thu Oct 24 22:18:50 2002 @@ -44,7 +44,7 @@ { if (oa) { - TRACE("\n\tlength=%lu, rootdir=0x%08x, objectname=%s\n\tattr=0x%08lx, sid=%p qos=%p\n", + TRACE("\n\tlength=%lu, rootdir=%p, objectname=%s\n\tattr=0x%08lx, sid=%p qos=%p\n", oa->Length, oa->RootDirectory, oa->ObjectName?debugstr_w(oa->ObjectName->Buffer):"null", oa->Attributes, oa->SecurityDescriptor, oa->SecurityQualityOfService); @@ -157,7 +157,7 @@ CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck, PBOOL IsMember ) { - FIXME("(0x%08x %p %p) stub!\n", TokenHandle, SidToCheck, IsMember); + FIXME("(%p %p %p) stub!\n", TokenHandle, SidToCheck, IsMember); *IsMember = TRUE; return(TRUE); @@ -178,7 +178,7 @@ GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass, LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen ) { - TRACE("(%x, %s, %p, %ld, %p): \n", + TRACE("(%p, %s, %p, %ld, %p): \n", token, (tokeninfoclass == TokenUser) ? "TokenUser" : (tokeninfoclass == TokenGroups) ? "TokenGroups" : @@ -214,7 +214,7 @@ SetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass, LPVOID tokeninfo, DWORD tokeninfolength ) { - FIXME("(%x, %s, %p, %ld): stub\n", + FIXME("(%p, %s, %p, %ld): stub\n", token, (tokeninfoclass == TokenUser) ? "TokenUser" : (tokeninfoclass == TokenGroups) ? "TokenGroups" : @@ -251,7 +251,7 @@ BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token) { - FIXME("(%p, %x): stub (NT impl. only)\n", thread, token); + FIXME("(%p, %p): stub (NT impl. only)\n", thread, token); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); @@ -1011,7 +1011,7 @@ */ BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken) { - FIXME("(%08x):stub returning FALSE\n", hToken); + FIXME("(%p):stub returning FALSE\n", hToken); return FALSE; } @@ -1088,7 +1088,7 @@ */ BOOL WINAPI PrivilegeCheck( HANDLE ClientToken, PPRIVILEGE_SET RequiredPrivileges, LPBOOL pfResult) { - FIXME("stub %d %p %p\n", ClientToken, RequiredPrivileges, pfResult); + FIXME("stub %p %p %p\n", ClientToken, RequiredPrivileges, pfResult); if (pfResult) *pfResult=TRUE; return TRUE; diff -ur dlls/advapi32.strict/service.c dlls/advapi32/service.c --- dlls/advapi32.strict/service.c Thu Aug 29 21:40:53 2002 +++ dlls/advapi32/service.c Thu Oct 24 21:57:41 2002 @@ -42,7 +42,7 @@ DWORD dwServiceState, LPENUM_SERVICE_STATUSA lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle ) -{ FIXME("%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager, +{ FIXME("%p type=%lx state=%lx %p %lx %p %p %p\n", hSCManager, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle); SetLastError (ERROR_ACCESS_DENIED); @@ -57,7 +57,7 @@ DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle ) -{ FIXME("%x type=%lx state=%lx %p %lx %p %p %p\n", hSCManager, +{ FIXME("%p type=%lx state=%lx %p %lx %p %p %p\n", hSCManager, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle); SetLastError (ERROR_ACCESS_DENIED); @@ -261,7 +261,7 @@ if (r!=ERROR_SUCCESS) return 0; - TRACE("returning %x\n",hKey); + TRACE("returning %p\n",hKey); return hKey; } @@ -297,7 +297,7 @@ ControlService( SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus ) { - FIXME("(%d,%ld,%p): stub\n",hService,dwControl,lpServiceStatus); + FIXME("(%p,%ld,%p): stub\n",hService,dwControl,lpServiceStatus); return TRUE; } @@ -314,7 +314,7 @@ BOOL WINAPI CloseServiceHandle( SC_HANDLE hSCObject ) { - TRACE("(%x)\n", hSCObject); + TRACE("(%p)\n", hSCObject); RegCloseKey(hSCObject); @@ -364,7 +364,7 @@ HKEY hKey; long r; - TRACE("(%d,%p,%ld)\n",hSCManager, lpServiceName, + TRACE("(%p,%p,%ld)\n",hSCManager, lpServiceName, dwDesiredAccess); MultiByteToWideChar( CP_ACP, 0, str, -1, lpServiceKey, sizeof(lpServiceKey)/sizeof(WCHAR) ); @@ -377,7 +377,7 @@ if (r!=ERROR_SUCCESS) return 0; - TRACE("returning %x\n",hKey); + TRACE("returning %p\n",hKey); return hKey; } @@ -394,7 +394,7 @@ LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword ) { - FIXME("(%u,%s,%s,...)\n", hSCManager, debugstr_w(lpServiceName), debugstr_w(lpDisplayName)); + FIXME("(%p,%s,%s,...)\n", hSCManager, debugstr_w(lpServiceName), debugstr_w(lpDisplayName)); return 0; } @@ -415,7 +415,7 @@ LONG r; DWORD dp; - TRACE("(%u,%s,%s,...)\n", hSCManager, debugstr_a(lpServiceName), debugstr_a(lpDisplayName)); + TRACE("(%p,%s,%s,...)\n", hSCManager, debugstr_a(lpServiceName), debugstr_a(lpDisplayName)); r = RegCreateKeyExA(hSCManager, lpServiceName, 0, NULL, REG_OPTION_NON_VOLATILE, dwDesiredAccess, NULL, &hKey, &dp); @@ -507,7 +507,7 @@ BOOL WINAPI DeleteService( SC_HANDLE hService ) { - FIXME("(%d): stub\n",hService); + FIXME("(%p): stub\n",hService); return TRUE; } @@ -523,7 +523,7 @@ LPWSTR *lpwstr=NULL; int i; - TRACE("(%d,%ld,%p)\n",hService,dwNumServiceArgs,lpServiceArgVectors); + TRACE("(%p,%ld,%p)\n",hService,dwNumServiceArgs,lpServiceArgVectors); if(dwNumServiceArgs) lpwstr = (LPWSTR*) HeapAlloc( GetProcessHeap(), 0, @@ -584,7 +584,7 @@ PROCESS_INFORMATION procinfo; STARTUPINFOA startupinfo; - TRACE("(%d,%ld,%p)\n",hService,dwNumServiceArgs, + TRACE("(%p,%ld,%p)\n",hService,dwNumServiceArgs, lpServiceArgVectors); size = sizeof str; @@ -678,7 +678,7 @@ LONG r; DWORD type, val, size; - FIXME("(%x,%p) partial\n",hService,lpservicestatus); + FIXME("(%p,%p) partial\n",hService,lpservicestatus); /* read the service type from the registry */ size = sizeof val;
Attachment:
pgp00077.pgp
Description: PGP signature