Skip to content

Commit 583e1b4

Browse files
committed
Fixed warning about unreferenced parameters.
1 parent bc04853 commit 583e1b4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

MemoryModule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ BuildImportTable(PMEMORYMODULE module)
425425

426426
static HCUSTOMMODULE _LoadLibrary(LPCSTR filename, void *userdata)
427427
{
428+
UNREFERENCED_PARAMETER(userdata);
428429
HMODULE result = LoadLibraryA(filename);
429430
if (result == NULL) {
430431
return NULL;
@@ -435,11 +436,13 @@ static HCUSTOMMODULE _LoadLibrary(LPCSTR filename, void *userdata)
435436

436437
static FARPROC _GetProcAddress(HCUSTOMMODULE module, LPCSTR name, void *userdata)
437438
{
439+
UNREFERENCED_PARAMETER(userdata);
438440
return (FARPROC) GetProcAddress((HMODULE) module, name);
439441
}
440442

441443
static void _FreeLibrary(HCUSTOMMODULE module, void *userdata)
442444
{
445+
UNREFERENCED_PARAMETER(userdata);
443446
FreeLibrary((HMODULE) module);
444447
}
445448

@@ -897,6 +900,7 @@ HMEMORYRSRC MemoryFindResourceEx(HMEMORYMODULE module, LPCTSTR name, LPCTSTR typ
897900

898901
DWORD MemorySizeofResource(HMEMORYMODULE module, HMEMORYRSRC resource)
899902
{
903+
UNREFERENCED_PARAMETER(module);
900904
PIMAGE_RESOURCE_DATA_ENTRY entry = (PIMAGE_RESOURCE_DATA_ENTRY) resource;
901905
if (entry == NULL) {
902906
return 0;

example/DllLoader/DllLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void LoadFromMemory(void)
102102
free(data);
103103
}
104104

105-
int main(int argc, char* argv[])
105+
int main()
106106
{
107107
LoadFromFile();
108108
printf("\n\n");

example/DllLoader/DllLoaderLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int RunFromMemory(void)
5454
return result;
5555
}
5656

57-
int main(int argc, char* argv[])
57+
int main()
5858
{
5959
return RunFromMemory();
6060
}

0 commit comments

Comments
 (0)