Warning fixes for 64bit visual c++ on Windows

This commit is contained in:
William S Fulton 2015-07-03 19:06:39 +01:00
commit edcdaaec16
17 changed files with 55 additions and 55 deletions

View file

@ -127,7 +127,7 @@ String *Swig_strip_c_comments(const String *s) {
}
if (comment_begin && comment_end) {
int size = comment_begin - Char(s);
int size = (int)(comment_begin - Char(s));
String *stripmore = 0;
stripped = NewStringWithSize(s, size);
Printv(stripped, comment_end + 1, NIL);
@ -808,7 +808,7 @@ void Swig_scopename_split(const String *s, String **rprefix, String **rlast) {
*rlast = Copy(s);
return;
} else {
*rprefix = NewStringWithSize(cc, co - cc - 2);
*rprefix = NewStringWithSize(cc, (int)(co - cc - 2));
*rlast = NewString(co);
return;
}
@ -835,7 +835,7 @@ void Swig_scopename_split(const String *s, String **rprefix, String **rlast) {
}
if (cc != tmp) {
*rprefix = NewStringWithSize(tmp, cc - tmp);
*rprefix = NewStringWithSize(tmp, (int)(cc - tmp));
*rlast = NewString(cc + 2);
return;
} else {
@ -858,7 +858,7 @@ String *Swig_scopename_prefix(const String *s) {
if (co == cc) {
return 0;
} else {
String *prefix = NewStringWithSize(cc, co - cc - 2);
String *prefix = NewStringWithSize(cc, (int)(co - cc - 2));
return prefix;
}
}
@ -884,7 +884,7 @@ String *Swig_scopename_prefix(const String *s) {
}
if (cc != tmp) {
return NewStringWithSize(tmp, cc - tmp);
return NewStringWithSize(tmp, (int)(cc - tmp));
} else {
return 0;
}
@ -977,7 +977,7 @@ String *Swig_scopename_first(const String *s) {
}
}
if (*c && (c != tmp)) {
return NewStringWithSize(tmp, c - tmp);
return NewStringWithSize(tmp, (int)(c - tmp));
} else {
return 0;
}
@ -1219,8 +1219,8 @@ static int split_regex_pattern_subst(String *s, String **pattern, String **subst
if (!p) goto err_out;
sube = p;
*pattern = NewStringWithSize(pats, pate - pats);
*subst = NewStringWithSize(subs, sube - subs);
*pattern = NewStringWithSize(pats, (int)(pate - pats));
*subst = NewStringWithSize(subs, (int)(sube - subs));
*input = p + 1;
return 1;
@ -1270,7 +1270,7 @@ String *replace_captures(int num_captures, const char *input, String *subst, int
/* Copy part without substitutions */
const char *q = strchr(p, '\\');
if (!q) {
copy_with_maybe_case_conversion(result, p, strlen(p), &convertCase, convertNextOnly);
copy_with_maybe_case_conversion(result, p, (int)strlen(p), &convertCase, convertNextOnly);
break;
}
copy_with_maybe_case_conversion(result, p, q - p, &convertCase, convertNextOnly);
@ -1350,7 +1350,7 @@ String *Swig_string_regex(String *s) {
pcre_error, Char(pattern), pcre_errorpos);
exit(1);
}
rc = pcre_exec(compiled_pat, NULL, input, strlen(input), 0, 0, captures, 30);
rc = pcre_exec(compiled_pat, NULL, input, (int)strlen(input), 0, 0, captures, 30);
if (rc >= 0) {
res = replace_captures(rc, input, subst, captures, pattern, s);
} else if (rc != PCRE_ERROR_NOMATCH) {