mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15: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
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* is inserted, so the string looks right on the console but still
|
||||
* contains the original string, plus other garbage:
|
||||
*/
|
||||
static char
|
||||
static char
|
||||
*backSpaceEdit(char *s)
|
||||
{
|
||||
char c;
|
||||
|
@ -58,7 +58,7 @@ handle_switch(FILE *outFile, int *sw, char *arg, char *desc)
|
|||
*sw = x;
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (desc)
|
||||
{
|
||||
esclog(outFile, "%s is %d (%s)\n", desc, *sw, changed ? "changed":"unchanged");
|
||||
|
@ -90,14 +90,14 @@ handle_switch_str(FILE *outFile, char *sw, char *arg, char *desc)
|
|||
changed = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (desc)
|
||||
{
|
||||
esclog(outFile, "%s is \"%s\" (%s)\n", desc, sw, changed ? "changed":"unchanged");
|
||||
if (!arg)
|
||||
esclog(outFile, "(readonly)\n");
|
||||
}
|
||||
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
@ -132,14 +132,14 @@ handle_switch_pstr(FILE *outFile, char **psw, char *arg, char *desc)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (desc)
|
||||
{
|
||||
esclog(outFile, "%s is \"%s\" (%s)\n", desc, *psw, changed ? "changed":"unchanged");
|
||||
if (!arg)
|
||||
esclog(outFile, "(readonly)\n");
|
||||
}
|
||||
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
@ -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) ))
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ handle_escape_cmd(FILE *outFile, char *Line, char *path, char *LineOut)
|
|||
{
|
||||
memset(&summ, 0, sizeof(SUMM));
|
||||
esclog(outFile, "Statistics cleared\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
stat_print(outFile, &summ);
|
||||
break;
|
||||
|
|
|
@ -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