Author: cfinck
Date: Sun Feb 3 16:36:10 2008
New Revision: 32104
URL:
http://svn.reactos.org/svn/reactos?rev=32104&view=rev
Log:
Get inflib_host to build warning-free
Modified:
trunk/reactos/lib/inflib/builddep.h
trunk/reactos/lib/inflib/infhostgen.c
trunk/reactos/lib/inflib/infhostput.c
trunk/reactos/lib/inflib/infput.c
Modified: trunk/reactos/lib/inflib/builddep.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/builddep.h?rev=…
==============================================================================
--- trunk/reactos/lib/inflib/builddep.h (original)
+++ trunk/reactos/lib/inflib/builddep.h Sun Feb 3 16:36:10 2008
@@ -16,9 +16,9 @@
#include <errno.h>
#define FREE(Area) free(Area)
-#define MALLOC(Size) malloc(Size)
-#define ZEROMEMORY(Area, Size) memset((Area), '\0', (Size))
-#define MEMCPY(Dest, Src, Size) memcpy((Dest), (Src), (Size))
+#define MALLOC(Size) malloc((size_t)(Size))
+#define ZEROMEMORY(Area, Size) memset((Area), '\0', (size_t)(Size))
+#define MEMCPY(Dest, Src, Size) memcpy((Dest), (Src), (size_t)(Size))
#define INF_STATUS_SUCCESS 0
#define INF_STATUS_NO_MEMORY ENOMEM
Modified: trunk/reactos/lib/inflib/infhostgen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infhostgen.c?re…
==============================================================================
--- trunk/reactos/lib/inflib/infhostgen.c (original)
+++ trunk/reactos/lib/inflib/infhostgen.c Sun Feb 3 16:36:10 2008
@@ -100,7 +100,7 @@
DPRINT("fopen() successful\n");
/* Query file size */
- if (fseek(File, 0, SEEK_END))
+ if (fseek(File, (size_t)0, SEEK_END))
{
DPRINT1("fseek() to EOF failed (errno %d)\n", errno);
fclose(File);
@@ -114,10 +114,10 @@
fclose(File);
return -1;
}
- DPRINT("File size: %lu\n", FileLength);
+ DPRINT("File size: %u\n", (UINT)FileLength);
/* Rewind */
- if (fseek(File, 0, SEEK_SET))
+ if (fseek(File, (size_t)0, SEEK_SET))
{
DPRINT1("fseek() to BOF failed (errno %d)\n", errno);
fclose(File);
@@ -134,7 +134,7 @@
}
/* Read file */
- if (FileLength != fread(FileBuffer, 1, FileLength, File))
+ if (FileLength != fread(FileBuffer, (size_t)1, (size_t)FileLength, File))
{
DPRINT1("fread() failed (errno %d)\n", errno);
fclose(File);
Modified: trunk/reactos/lib/inflib/infhostput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infhostput.c?re…
==============================================================================
--- trunk/reactos/lib/inflib/infhostput.c (original)
+++ trunk/reactos/lib/inflib/infhostput.c Sun Feb 3 16:36:10 2008
@@ -43,7 +43,7 @@
fprintf(File, "; %s\r\n\r\n", HeaderComment);
}
- if (BufferSize != fwrite(Buffer, 1, BufferSize, File))
+ if (BufferSize != fwrite(Buffer, (size_t)1, (size_t)BufferSize, File))
{
DPRINT1("fwrite() failed (errno %d)\n", errno);
fclose(File);
Modified: trunk/reactos/lib/inflib/infput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infput.c?rev=32…
==============================================================================
--- trunk/reactos/lib/inflib/infput.c (original)
+++ trunk/reactos/lib/inflib/infput.c Sun Feb 3 16:36:10 2008
@@ -40,13 +40,13 @@
Length = _tcslen(Text);
if (OutBuf->FreeSize < Length + 1 && INF_SUCCESS(OutBuf->Status))
{
- DPRINT("Out of free space. TotalSize %lu FreeSize %lu Length %u\n",
- OutBuf->TotalSize, OutBuf->FreeSize, Length);
+ DPRINT("Out of free space. TotalSize %u FreeSize %u Length %u\n",
+ (UINT)OutBuf->TotalSize, (UINT)OutBuf->FreeSize, (UINT)Length);
/* Round up to next SIZE_INC */
NewSize = OutBuf->TotalSize +
(((Length + 1) - OutBuf->FreeSize + (SIZE_INC - 1)) /
SIZE_INC) * SIZE_INC;
- DPRINT("NewSize %lu\n", NewSize);
+ DPRINT("NewSize %u\n", (UINT)NewSize);
NewBuf = MALLOC(NewSize);
/* Abort if failed */
if (NULL == NewBuf)
@@ -59,8 +59,8 @@
/* Need to copy old contents? */
if (NULL != OutBuf->Buffer)
{
- DPRINT("Copying %lu bytes from old content\n",
- OutBuf->TotalSize - OutBuf->FreeSize);
+ DPRINT("Copying %u bytes from old content\n",
+ (UINT)(OutBuf->TotalSize - OutBuf->FreeSize));
MEMCPY(NewBuf, OutBuf->Buffer, OutBuf->TotalSize - OutBuf->FreeSize);
OutBuf->Current = NewBuf + (OutBuf->Current - OutBuf->Buffer);
FREE(OutBuf->Buffer);
@@ -72,8 +72,8 @@
OutBuf->Buffer = NewBuf;
OutBuf->FreeSize += NewSize - OutBuf->TotalSize;
OutBuf->TotalSize = NewSize;
- DPRINT("After reallocation TotalSize %lu FreeSize %lu\n",
- OutBuf->TotalSize, OutBuf->FreeSize);
+ DPRINT("After reallocation TotalSize %u FreeSize %u\n",
+ (UINT)OutBuf->TotalSize, (UINT)OutBuf->FreeSize);
}
/* We're guaranteed to have enough room now. Copy char by char because of