fix compiler warnings

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7899 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-11-29 01:58:31 +00:00
commit a28abe7161
2 changed files with 10 additions and 10 deletions

View file

@ -235,13 +235,12 @@ DohEqual(const DOH *obj1, const DOH *obj2) {
} else {
int len = (b1info->doh_len)(b1);
char *cobj = (char *) obj2;
return len == strlen(cobj) ? (memcmp(RawData(b1), cobj, len) == 0) : 0;
return len == (int)strlen(cobj) ? (memcmp(RawData(b1), cobj, len) == 0) : 0;
}
} else if (DohCheck(b2)) {
b2info = b2->type;
int len = (b2info->doh_len)(b2);
int len = (b2->type->doh_len)(b2);
char *cobj = (char *) obj1;
return len == strlen(cobj) ? (memcmp(RawData(b2), cobj, len) == 0) : 0;
return len == (int)strlen(cobj) ? (memcmp(RawData(b2), cobj, len) == 0) : 0;
} else {
return strcmp((char*) obj1, (char*) obj2) == 0;
}

View file

@ -66,9 +66,9 @@ skip_tochar(String *s, int ch, String *out) {
}
static void
copy_location(DOH *s1, DOH *s2) {
Setfile(s2,Getfile(s1));
Setline(s2,Getline(s1));
copy_location(const DOH *s1, DOH *s2) {
Setfile(s2,Getfile((DOH *)s1));
Setline(s2,Getline((DOH *)s1));
}
static String *cpp_include(String_or_char *fn, int sysfile) {
@ -237,7 +237,7 @@ String_or_char *Macro_vararg_name(String_or_char *str,
return varargname;
}
Hash *Preprocessor_define(const String *str, int swigmacro)
Hash *Preprocessor_define(const String_or_char *_str, int swigmacro)
{
String *macroname = 0, *argstr = 0, *macrovalue = 0, *file = 0, *s = 0;
Hash *macro = 0, *symbols = 0, *m1;
@ -245,6 +245,8 @@ Hash *Preprocessor_define(const String *str, int swigmacro)
int c, line;
int varargs = 0;
String *str = NewString(_str);
assert(cpp);
assert(str);
@ -1688,8 +1690,7 @@ Preprocessor_parse(String *s)
}
if (allow) {
Seek(value,0,SEEK_SET);
DOH *m = Preprocessor_define(value,1);
Delete(m);
Delete(Preprocessor_define(value,1));
}
StringPutc('\n',ns);
addline(ns,value,0);