summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-09 10:24:09 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-09 10:24:09 +0100
commit7e12a6cccb42711c0399bbcd0e7cc3008f56cd2f (patch)
tree75a1b7989253eb5535c1f707997897df4334f9ab /soltools
parenta6d3c97473ed9c17b6cbf12045155da3198d1b49 (diff)
warning C4267: conversion from 'size_t' to 'int' (MSVC 64-bit)
Change-Id: I2fa40ebe467a65b0d6023883a14c79ff4303bb2f
Diffstat (limited to 'soltools')
-rw-r--r--soltools/mkdepend/cppsetup.c6
-rw-r--r--soltools/mkdepend/ifparser.c6
-rw-r--r--soltools/mkdepend/ifparser.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c
index 383353036133..c57fe0cb6a9e 100644
--- a/soltools/mkdepend/cppsetup.c
+++ b/soltools/mkdepend/cppsetup.c
@@ -151,7 +151,7 @@ _my_if_errors (IfParser *ip, const char *cp, const char *expecting)
#define MAXNAMELEN 256
char *
-_lookup_variable (const char *var, int len)
+_lookup_variable (const char *var, size_t len)
{
char tmpbuf[MAXNAMELEN + 1];
@@ -165,7 +165,7 @@ _lookup_variable (const char *var, int len)
static int
-_my_eval_defined (IfParser *ip, const char *var, int len)
+_my_eval_defined (IfParser *ip, const char *var, size_t len)
{
(void)ip;
if (_lookup_variable (var, len))
@@ -177,7 +177,7 @@ _my_eval_defined (IfParser *ip, const char *var, int len)
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
static int
-_my_eval_variable (IfParser *ip, const char *var, int len)
+_my_eval_variable (IfParser *ip, const char *var, size_t len)
{
char *s;
diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c
index d342aa0e6365..39d36426279b 100644
--- a/soltools/mkdepend/ifparser.c
+++ b/soltools/mkdepend/ifparser.c
@@ -157,7 +157,7 @@ parse_value (IfParser *g, const char *cp, int *valp)
case 'd':
if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
int paren = 0;
- int len;
+ size_t len;
cp += 7;
SKIPSPACE (cp);
@@ -166,7 +166,7 @@ parse_value (IfParser *g, const char *cp, int *valp)
cp++;
}
DO (cp = parse_variable (g, cp, &var));
- len = (int)(cp - var);
+ len = (size_t)(cp - var);
SKIPSPACE (cp);
if (paren && *cp != ')')
return CALLFUNC(g, handle_error) (g, cp, ")");
@@ -182,7 +182,7 @@ parse_value (IfParser *g, const char *cp, int *valp)
return CALLFUNC(g, handle_error) (g, cp, "variable or number");
else {
DO (cp = parse_variable (g, cp, &var));
- *valp = (*(g->funcs.eval_variable)) (g, var, cp - var);
+ *valp = (*(g->funcs.eval_variable)) (g, var, (size_t)(cp - var));
}
return cp;
diff --git a/soltools/mkdepend/ifparser.h b/soltools/mkdepend/ifparser.h
index 97d74824c97e..dbc1e86ac3a6 100644
--- a/soltools/mkdepend/ifparser.h
+++ b/soltools/mkdepend/ifparser.h
@@ -65,8 +65,8 @@ typedef int Bool;
typedef struct _if_parser {
struct { /* functions */
const char *(*handle_error) (struct _if_parser *, const char *, const char *);
- int (*eval_variable) (struct _if_parser *, const char *, int);
- int (*eval_defined) (struct _if_parser *, const char *, int);
+ int (*eval_variable) (struct _if_parser *, const char *, size_t);
+ int (*eval_defined) (struct _if_parser *, const char *, size_t);
} funcs;
char *data;
} IfParser;