mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix various 64bit compiler warnings
This commit is contained in:
parent
a61316891e
commit
6fe9f6e521
@ -94,7 +94,7 @@ CopySections(const unsigned char *data, PIMAGE_NT_HEADERS old_headers, PMEMORYMO
|
||||
MEM_COMMIT,
|
||||
PAGE_READWRITE);
|
||||
|
||||
section->Misc.PhysicalAddress = (POINTER_TYPE)dest;
|
||||
section->Misc.PhysicalAddress = (DWORD)dest;
|
||||
memset(dest, 0, size);
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ CopySections(const unsigned char *data, PIMAGE_NT_HEADERS old_headers, PMEMORYMO
|
||||
MEM_COMMIT,
|
||||
PAGE_READWRITE);
|
||||
memcpy(dest, data + section->PointerToRawData, section->SizeOfRawData);
|
||||
section->Misc.PhysicalAddress = (POINTER_TYPE)dest;
|
||||
section->Misc.PhysicalAddress = (DWORD)dest;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ PerformBaseRelocation(PMEMORYMODULE module, SIZE_T delta)
|
||||
case IMAGE_REL_BASED_HIGHLOW:
|
||||
// change complete 32 bit address
|
||||
patchAddrHL = (DWORD *) (dest + offset);
|
||||
*patchAddrHL += delta;
|
||||
*patchAddrHL += (DWORD)delta;
|
||||
break;
|
||||
|
||||
#ifdef _WIN64
|
||||
@ -434,7 +434,7 @@ FARPROC MemoryGetProcAddress(HMEMORYMODULE module, const char *name)
|
||||
nameRef = (DWORD *) (codeBase + exports->AddressOfNames);
|
||||
ordinal = (WORD *) (codeBase + exports->AddressOfNameOrdinals);
|
||||
for (i=0; i<exports->NumberOfNames; i++, nameRef++, ordinal++) {
|
||||
if (stricmp(name, (const char *) (codeBase + (*nameRef))) == 0) {
|
||||
if (_stricmp(name, (const char *) (codeBase + (*nameRef))) == 0) {
|
||||
idx = *ordinal;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user