diff --git a/Examples/test-suite/csharp_exceptions.i b/Examples/test-suite/csharp_exceptions.i index 35ed2db54..870e01790 100644 --- a/Examples/test-suite/csharp_exceptions.i +++ b/Examples/test-suite/csharp_exceptions.i @@ -30,7 +30,7 @@ %csnothrowexception NoThrowException() { try { $action - } catch(Ex e) { + } catch(Ex) { // swallowed } } diff --git a/Examples/test-suite/typemap_variables.i b/Examples/test-suite/typemap_variables.i index 2e06a5017..a9f442b0f 100644 --- a/Examples/test-suite/typemap_variables.i +++ b/Examples/test-suite/typemap_variables.i @@ -18,13 +18,13 @@ // Statically typed languages use in/out for variables %typemap(in) int "this_will_not_compile_in " %typemap(out) int "this_will_not_compile_out" -%typemap(in) int globul "/*int globul in */" +%typemap(in) int globul "/*int globul in */ $1=0;" %typemap(out) int globul "/*int globul out*/" -%typemap(in) int Space::nspace "/*int nspace in */" +%typemap(in) int Space::nspace "/*int nspace in */ $1=0;" %typemap(out) int Space::nspace "/*int nspace out*/" -%typemap(in) int member "/*int member in */" +%typemap(in) int member "/*int member in */ $1=0;" %typemap(out) int member "/*int member out*/" -%typemap(in) int Space::Struct::smember "/*int smember in */" +%typemap(in) int Space::Struct::smember "/*int smember in */ $1=0;" %typemap(out) int Space::Struct::smember "/*int smember out*/" %typemap(javain) int "this_will_not_compile_javain " diff --git a/Examples/test-suite/virtual_poly.i b/Examples/test-suite/virtual_poly.i index e7543f709..338637f43 100644 --- a/Examples/test-suite/virtual_poly.i +++ b/Examples/test-suite/virtual_poly.i @@ -157,7 +157,7 @@ template struct Base { virtual IntegerPtr defaultargs(double d, int * a = 0) = 0; static void StaticHidden() {} void AmIAmINotVirtual() {} - IntegerPtr NotVirtual(IntegerPtr i) {} + IntegerPtr NotVirtual(IntegerPtr i) { return 0; } virtual Base * covariant(int a = 0, int * i = 0) { return 0; } typedef Base * BasePtr; virtual BasePtr covariant2() { return 0; } @@ -172,7 +172,7 @@ template struct Derived : Base { Double function() { return 0; } int * defaultargs(Double d, IntegerPtr a = 0) { return 0; } void AmIAmINotVirtual() {} - int * NotVirtual(int *i) {} + int * NotVirtual(int *i) { return 0; } typedef Derived * DerivedPtr; DerivedPtr covariant(int a = 0, IntegerPtr i = 0) { return 0; } DerivedPtr covariant2() { return 0; } @@ -185,7 +185,7 @@ template struct Bottom : Derived { int * method() const { return 0; } static void StaticHidden() {} void AmIAmINotVirtual() {} - IntegerPtr NotVirtual(IntegerPtr i) {} + IntegerPtr NotVirtual(IntegerPtr i) { return 0; } void (*funcptr)(int a, bool b); Bottom * covariant(int a = 0, IntegerPtr i = 0) { return 0; } Derived * covariant2() { return 0; } diff --git a/Source/Modules/allocate.cxx b/Source/Modules/allocate.cxx index e81d7b006..4b83e1c3e 100644 --- a/Source/Modules/allocate.cxx +++ b/Source/Modules/allocate.cxx @@ -148,7 +148,7 @@ class Allocate : public Dispatcher { String *base_returntype = function_return_type(base); returntype_match = Strcmp(this_returntype, base_returntype) == 0 ? true : false; if (!returntype_match) { - covariant_returntype = SwigType_issubtype(this_returntype, base_returntype); + covariant_returntype = SwigType_issubtype(this_returntype, base_returntype) ? true : false; returntype_match = covariant_returntype; } @@ -168,8 +168,8 @@ class Allocate : public Dispatcher { this_fn = SwigType_typedef_resolve_all(this_fn); if (Strcmp(base_fn, this_fn) == 0) { // Finally check that the qualifiers match - bool base_qualifier = SwigType_isqualifier(resolved_decl); - bool this_qualifier = SwigType_isqualifier(base_decl); + int base_qualifier = SwigType_isqualifier(resolved_decl); + int this_qualifier = SwigType_isqualifier(base_decl); if (base_qualifier == this_qualifier) { decl_match = true; } diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 0e0112ad7..36420178a 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -1486,7 +1486,7 @@ class JAVA : public Language { String *baseclass = NULL; String *c_baseclassname = NULL; String *typemap_lookup_type = Getattr(n,"classtypeobj"); - bool feature_director = Swig_directorclass(n); + bool feature_director = Swig_directorclass(n) ? true : false; /* Deal with inheritance */ List *baselist = Getattr(n,"bases"); @@ -2793,7 +2793,7 @@ class JAVA : public Language { sym_name, sym_name); Printf(code_wrap->code, " (void)jcls;\n"); Printf(code_wrap->code, " if (director) {\n"); - Printf(code_wrap->code, " director->swig_java_change_ownership(jenv, jself, jtake_or_release);\n"); + Printf(code_wrap->code, " director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);\n"); Printf(code_wrap->code, " }\n"); Printf(code_wrap->code, "}\n"); diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 8a10e16a6..223b6c12d 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -1407,7 +1407,7 @@ public: emit_action(n,f); if (directorsEnabled()) { - Printf(f->code, "} catch (Swig::DirectorException& e) {\n"); + Printf(f->code, "} catch (Swig::DirectorException&) {\n"); Printf(f->code, " SWIG_fail;\n"); Printf(f->code, "}\n"); }