Author: sginsberg
Date: Sun Aug 30 20:11:09 2009
New Revision: 42971
URL:
http://svn.reactos.org/svn/reactos?rev=42971&view=rev
Log:
- Fix some inflib warnings
Modified:
trunk/reactos/lib/inflib/infcore.c
trunk/reactos/lib/inflib/infget.c
trunk/reactos/lib/inflib/infhostgen.c
trunk/reactos/lib/inflib/infpriv.h
Modified: trunk/reactos/lib/inflib/infcore.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infcore.c?rev=4…
==============================================================================
--- trunk/reactos/lib/inflib/infcore.c [iso-8859-1] (original)
+++ trunk/reactos/lib/inflib/infcore.c [iso-8859-1] Sun Aug 30 20:11:09 2009
@@ -181,8 +181,8 @@
}
/* Allocate and initialize the new section */
- Size = FIELD_OFFSET(INFCACHESECTION,
- Name[_tcslen (Name) + 1]);
+ Size = (ULONG)FIELD_OFFSET(INFCACHESECTION,
+ Name[_tcslen (Name) + 1]);
Section = (PINFCACHESECTION)MALLOC (Size);
if (Section == NULL)
{
@@ -286,8 +286,8 @@
PINFCACHEFIELD Field;
ULONG Size;
- Size = FIELD_OFFSET(INFCACHEFIELD,
- Data[_tcslen(Data) + 1]);
+ Size = (ULONG)FIELD_OFFSET(INFCACHEFIELD,
+ Data[_tcslen(Data) + 1]);
Field = (PINFCACHEFIELD)MALLOC(Size);
if (Field == NULL)
{
@@ -382,7 +382,7 @@
/* push data from current token start up to pos into the current token */
static int push_token( struct parser *parser, const CHAR *pos )
{
- unsigned int len = pos - parser->start;
+ UINT len = (UINT)(pos - parser->start);
const CHAR *src = parser->start;
TCHAR *dst = parser->token + parser->token_len;
@@ -808,7 +808,7 @@
{
if (error_line)
*error_line = parser.line_pos;
- return parser.error;
+ return (INFSTATUS)parser.error;
}
/* find the [strings] section */
Modified: trunk/reactos/lib/inflib/infget.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infget.c?rev=42…
==============================================================================
--- trunk/reactos/lib/inflib/infget.c [iso-8859-1] (original)
+++ trunk/reactos/lib/inflib/infget.c [iso-8859-1] Sun Aug 30 20:11:09 2009
@@ -243,7 +243,7 @@
for (Index = 1; Index < FieldIndex; Index++)
CacheField = CacheField->Next;
- Size = CacheLine->FieldCount - FieldIndex + 1;
+ Size = (ULONG)CacheLine->FieldCount - FieldIndex + 1;
if (RequiredSize != NULL)
*RequiredSize = Size;
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 [iso-8859-1] (original)
+++ trunk/reactos/lib/inflib/infhostgen.c [iso-8859-1] Sun Aug 30 20:11:09 2009
@@ -107,7 +107,7 @@
return -1;
}
- FileLength = ftell(File);
+ FileLength = (ULONG)ftell(File);
if ((ULONG) -1 == FileLength)
{
DPRINT1("ftell() failed (errno %d)\n", errno);
Modified: trunk/reactos/lib/inflib/infpriv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/infpriv.h?rev=4…
==============================================================================
--- trunk/reactos/lib/inflib/infpriv.h [iso-8859-1] (original)
+++ trunk/reactos/lib/inflib/infpriv.h [iso-8859-1] Sun Aug 30 20:11:09 2009
@@ -69,7 +69,7 @@
PINFCACHELINE Line;
} INFCONTEXT;
-typedef long INFSTATUS;
+typedef int INFSTATUS;
/* FUNCTIONS ****************************************************************/