From cb5bf8777ef48ba37e3c5afdd782a9b5cf0265d3 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 20 Jul 2013 11:40:04 +0000 Subject: [PATCH] [SPEC2DEF] - Fix warnings svn path=/trunk/; revision=59537 --- reactos/tools/spec2def/spec2def.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/tools/spec2def/spec2def.c b/reactos/tools/spec2def/spec2def.c index 569a822eaec..e5cee3c85ec 100644 --- a/reactos/tools/spec2def/spec2def.c +++ b/reactos/tools/spec2def/spec2def.c @@ -10,7 +10,7 @@ typedef struct { char *pcName; - size_t nNameLength; + int nNameLength; char *pcRedirection; int nRedirectionLength; int nCallingConvention; @@ -315,7 +315,7 @@ void PrintName(FILE *fileDest, EXPORT *pexp, char *pszPrefix, int fRedir, int fDeco) { char *pcName = fRedir ? pexp->pcRedirection : pexp->pcName; - size_t nNameLength = fRedir ? pexp->nRedirectionLength : pexp->nNameLength; + int nNameLength = fRedir ? pexp->nRedirectionLength : pexp->nNameLength; /* Handle autoname */ if (nNameLength == 1 && pcName[0] == '@') @@ -649,10 +649,10 @@ ParseFile(char* pcStart, FILE *fileDest, PFNOUTLINE OutputLine) { /* Check for stdcall name */ char *p = strchr(pc, '@'); - if (p && ((size_t)(p - pc) < exp.nNameLength)) + if (p && (p - pc < exp.nNameLength)) { int i; - exp.nNameLength = p - pc; + exp.nNameLength = (int)(p - pc); if (exp.nNameLength < 1) { fprintf(stderr, "error, @ in line %d\n", nLine); @@ -669,7 +669,8 @@ ParseFile(char* pcStart, FILE *fileDest, PFNOUTLINE OutputLine) } /* Get optional redirection */ - if ((pc = NextToken(pc))) + pc = NextToken(pc); + if (pc) { exp.pcRedirection = pc; exp.nRedirectionLength = TokenLength(pc);