mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 01:10:26 +00:00
[HOST]
Try to fix some host warnings. svn path=/trunk/; revision=63512
This commit is contained in:
parent
96f0120d3a
commit
4289bcee64
5 changed files with 23 additions and 26 deletions
|
@ -14,8 +14,8 @@ HvpWriteLog(
|
|||
PHHIVE RegistryHive)
|
||||
{
|
||||
ULONG FileOffset;
|
||||
ULONG BufferSize;
|
||||
ULONG BitmapSize;
|
||||
UINT BufferSize;
|
||||
UINT BitmapSize;
|
||||
PUCHAR Buffer;
|
||||
PUCHAR Ptr;
|
||||
ULONG BlockIndex;
|
||||
|
|
|
@ -5,19 +5,16 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define IMAGE_FILE_MACHINE_I386 0x014c
|
||||
#define IMAGE_FILE_MACHINE_AMD64 0x8664
|
||||
#define IMAGE_FILE_MACHINE_ARMNT 0x01c4
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#define PRIx64 "I64x"
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#define PRIx64 "llx"
|
||||
#include <inttypes.h>
|
||||
#define _stricmp strcasecmp
|
||||
#endif
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ handle_address_cmd(FILE *outFile, char *arg)
|
|||
if(( s = strchr(arg, ':') ))
|
||||
{
|
||||
*s = ' ';
|
||||
if ( (cnt = sscanf(arg,"%20s %lx", Image, &Offset)) == 2)
|
||||
if ( (cnt = sscanf(arg,"%20s %x", Image, &Offset)) == 2)
|
||||
{
|
||||
if (( plm = entry_lookup(&cache, Image) ))
|
||||
{
|
||||
|
|
|
@ -32,8 +32,8 @@ static int match_mod(FILE *outFile, char *Line, int processed)
|
|||
{
|
||||
static int state = 0;
|
||||
char Image[NAMESIZE];
|
||||
DWORD Base;
|
||||
DWORD Size;
|
||||
UINT Base;
|
||||
UINT Size;
|
||||
PLIST_MEMBER plm;
|
||||
|
||||
int cnt;
|
||||
|
@ -48,13 +48,13 @@ static int match_mod(FILE *outFile, char *Line, int processed)
|
|||
switch (state)
|
||||
{
|
||||
case 1:
|
||||
if ( (cnt = sscanf(Line,"%lx %lx %20s", &Base, &Size, Image)) == 3 )
|
||||
if ( (cnt = sscanf(Line,"%x %x %20s", &Base, &Size, Image)) == 3 )
|
||||
{
|
||||
if (( plm = entry_lookup(&cache, Image) ))
|
||||
{
|
||||
plm->RelBase = Base;
|
||||
plm->Size = Size;
|
||||
l2l_dbg(1, "Relocated: %s %08x -> %08x\n", Image, plm->ImageBase, plm->RelBase);
|
||||
l2l_dbg(1, "Relocated: %s %p -> %p\n", Image, (void*)plm->ImageBase, (void*)plm->RelBase);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ RelocateSection(
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("Unknown relocatation type %d, address 0x%lx\n",
|
||||
pReloc->Type, pReloc->VirtualAddress);
|
||||
printf("Unknown relocatation type %u, address 0x%x\n",
|
||||
pReloc->Type, (unsigned)pReloc->VirtualAddress);
|
||||
}
|
||||
|
||||
pReloc++;
|
||||
|
@ -99,7 +99,7 @@ int main(int argc, char *argv[])
|
|||
if (!pData)
|
||||
{
|
||||
fclose(pSourceFile);
|
||||
fprintf(stderr, "Failed to allocate %ld bytes\n", nFileSize);
|
||||
fprintf(stderr, "Failed to allocate %lu bytes\n", nFileSize);
|
||||
return -3;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
free(pData);
|
||||
fclose(pSourceFile);
|
||||
fprintf(stderr, "Failed to read %ld bytes from source file\n", nFileSize);
|
||||
fprintf(stderr, "Failed to read %lu bytes from source file\n", nFileSize);
|
||||
return -4;
|
||||
}
|
||||
|
||||
|
@ -147,8 +147,8 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
free(pData);
|
||||
fclose(pDestFile);
|
||||
fprintf(stderr, "Failed to write %ld bytes to destination file\n",
|
||||
pSectionHeader->SizeOfRawData);
|
||||
fprintf(stderr, "Failed to write %u bytes to destination file\n",
|
||||
(unsigned int)pSectionHeader->SizeOfRawData);
|
||||
return -6;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue