Author: tkreuzer Date: Sat May 31 15:29:10 2014 New Revision: 63512
URL: http://svn.reactos.org/svn/reactos?rev=63512&view=rev Log: [HOST] Try to fix some host warnings.
Modified: trunk/reactos/lib/cmlib/hivewrt.c trunk/reactos/tools/geninc/geninc.c trunk/reactos/tools/log2lines/cmd.c trunk/reactos/tools/log2lines/match.c trunk/reactos/tools/obj2bin/obj2bin.c
Modified: trunk/reactos/lib/cmlib/hivewrt.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivewrt.c?rev=635... ============================================================================== --- trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] Sat May 31 15:29:10 2014 @@ -14,8 +14,8 @@ PHHIVE RegistryHive) { ULONG FileOffset; - ULONG BufferSize; - ULONG BitmapSize; + UINT BufferSize; + UINT BitmapSize; PUCHAR Buffer; PUCHAR Ptr; ULONG BlockIndex;
Modified: trunk/reactos/tools/geninc/geninc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/geninc/geninc.c?rev=6... ============================================================================== --- trunk/reactos/tools/geninc/geninc.c [iso-8859-1] (original) +++ trunk/reactos/tools/geninc/geninc.c [iso-8859-1] Sat May 31 15:29:10 2014 @@ -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
Modified: trunk/reactos/tools/log2lines/cmd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cmd.c?rev=6... ============================================================================== --- trunk/reactos/tools/log2lines/cmd.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/cmd.c [iso-8859-1] Sat May 31 15:29:10 2014 @@ -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 @@ *sw = x; changed = 1; } - } + } if (desc) { esclog(outFile, "%s is %d (%s)\n", desc, *sw, changed ? "changed":"unchanged"); @@ -90,14 +90,14 @@ 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 @@ } } } - } + } 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 @@ 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 @@ { memset(&summ, 0, sizeof(SUMM)); esclog(outFile, "Statistics cleared\n"); - } + } else stat_print(outFile, &summ); break;
Modified: trunk/reactos/tools/log2lines/match.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/match.c?rev... ============================================================================== --- trunk/reactos/tools/log2lines/match.c [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/match.c [iso-8859-1] Sat May 31 15:29:10 2014 @@ -32,8 +32,8 @@ { static int state = 0; char Image[NAMESIZE]; - DWORD Base; - DWORD Size; + UINT Base; + UINT Size; PLIST_MEMBER plm;
int cnt; @@ -48,13 +48,13 @@ 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; }
Modified: trunk/reactos/tools/obj2bin/obj2bin.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/obj2bin/obj2bin.c?rev... ============================================================================== --- trunk/reactos/tools/obj2bin/obj2bin.c [iso-8859-1] (original) +++ trunk/reactos/tools/obj2bin/obj2bin.c [iso-8859-1] Sat May 31 15:29:10 2014 @@ -52,8 +52,8 @@ 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 @@ 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 @@ { 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 @@ { 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; }