Merge pull request #2238 from ergo720/XB_InitializeObjectAttributes_fix

Removed unused dwBytesRead variable and unused argument from XB_InitalizeObjectAttributes macro
This commit is contained in:
ergo720 2021-06-10 12:44:48 +02:00 committed by GitHub
commit c7bf62ce62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -152,7 +152,6 @@ xbox::hresult_xt WINAPI xbox::EMUPATCH(XAudioDownloadEffectsImage)
else { // load from file else { // load from file
LPDIRECTSOUND8 pThis_tmp = zeroptr; LPDIRECTSOUND8 pThis_tmp = zeroptr;
HANDLE hFile; HANDLE hFile;
DWORD dwBytesRead;
// using xbox::NtCreateFile() directly instead of Host CreateFile(); // using xbox::NtCreateFile() directly instead of Host CreateFile();
OBJECT_ATTRIBUTES obj; OBJECT_ATTRIBUTES obj;

View File

@ -75,7 +75,7 @@ ntstatus_xt ObpReferenceObjectByName(
OUT PVOID *ReturnedObject OUT PVOID *ReturnedObject
); );
#define XB_InitializeObjectAttributes(p, n, a, r, s){\ #define XB_InitializeObjectAttributes(p, n, a, r){\
(p)->RootDirectory = r; \ (p)->RootDirectory = r; \
(p)->Attributes = a; \ (p)->Attributes = a; \
(p)->ObjectName = n; \ (p)->ObjectName = n; \

View File

@ -82,7 +82,7 @@ xbox::boolean_xt xbox::ObpCreatePermanentDirectoryObject(
LOG_FUNC_END; LOG_FUNC_END;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
XB_InitializeObjectAttributes(&ObjectAttributes, DirectoryName, OBJ_PERMANENT, NULL, NULL); XB_InitializeObjectAttributes(&ObjectAttributes, DirectoryName, OBJ_PERMANENT, NULL);
HANDLE Handle; HANDLE Handle;
NTSTATUS status = NtCreateDirectoryObject(&Handle, &ObjectAttributes); NTSTATUS status = NtCreateDirectoryObject(&Handle, &ObjectAttributes);