diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2014-03-15 18:24:01 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2014-03-15 18:24:01 +0000 |
commit | e2b6de8a039a39f7d854b2dd62eb9b93fb79e358 (patch) | |
tree | 692e0d7d86ab7e36c6795894e7bf252fbcf98fef | |
parent | 13aac0dca93188a70076c64269741516f7f75816 (diff) | |
download | swig-e2b6de8a039a39f7d854b2dd62eb9b93fb79e358.tar.gz |
Compiler warning fixes in testcases
-rw-r--r-- | Examples/test-suite/java_director_exception_feature.i | 2 | ||||
-rw-r--r-- | Examples/test-suite/java_director_exception_feature_nspace.i | 1 | ||||
-rw-r--r-- | Examples/test-suite/template_typemaps.i | 18 | ||||
-rw-r--r-- | Examples/test-suite/typemap_various.i | 15 |
4 files changed, 23 insertions, 13 deletions
diff --git a/Examples/test-suite/java_director_exception_feature.i b/Examples/test-suite/java_director_exception_feature.i index a92193f1d..d6f1e3f55 100644 --- a/Examples/test-suite/java_director_exception_feature.i +++ b/Examples/test-suite/java_director_exception_feature.i @@ -80,6 +80,7 @@ // throws typemaps for c++->java exception conversions %typemap(throws,throws="MyJavaException1") MyNS::Exception1 %{ + (void)$1; jclass excpcls = jenv->FindClass("java_director_exception_feature/MyJavaException1"); if (excpcls) { jenv->ThrowNew(excpcls, $1.what()); @@ -88,6 +89,7 @@ %} %typemap(throws,throws="MyJavaException1") int %{ + (void)$1; jclass excpcls = jenv->FindClass("java_director_exception_feature/MyJavaException1"); if (excpcls) { jenv->ThrowNew(excpcls, "Threw some integer"); diff --git a/Examples/test-suite/java_director_exception_feature_nspace.i b/Examples/test-suite/java_director_exception_feature_nspace.i index aea362905..264c2a938 100644 --- a/Examples/test-suite/java_director_exception_feature_nspace.i +++ b/Examples/test-suite/java_director_exception_feature_nspace.i @@ -95,6 +95,7 @@ %} %typemap(throws,throws=PACKAGEDOT"MyNS.MyJavaException1") int %{ + (void)$1; jclass excpcls = jenv->FindClass(PACKAGESLASH"MyNS/MyJavaException1"); if (excpcls) { jenv->ThrowNew(excpcls, "Threw some integer"); diff --git a/Examples/test-suite/template_typemaps.i b/Examples/test-suite/template_typemaps.i index c68eba730..d01945460 100644 --- a/Examples/test-suite/template_typemaps.i +++ b/Examples/test-suite/template_typemaps.i @@ -7,10 +7,11 @@ /* do nothing */ } -%typemap(out) Integer1 -{ - /* do nothing */ -} +#ifdef SWIGCSHARP +%typemap(out) Integer1 { /* do nothing */ $result = 0; } +#else +%typemap(out) Integer1 { /* do nothing */ } +#endif %typemap(in) Integer2 { @@ -18,10 +19,11 @@ /* do nothing */ } -%typemap(out) Integer2 -{ - /* do nothing */ -} +#ifdef SWIGCSHARP +%typemap(out) Integer2 { /* do nothing */ $result = 0; } +#else +%typemap(out) Integer2 { /* do nothing */ } +#endif %{ typedef int Integer1; diff --git a/Examples/test-suite/typemap_various.i b/Examples/test-suite/typemap_various.i index 2a1777ea8..c2f70ce55 100644 --- a/Examples/test-suite/typemap_various.i +++ b/Examples/test-suite/typemap_various.i @@ -55,14 +55,19 @@ void foo2(Foo<short> f, const Foo<short>& ff) {} }; } +#ifdef SWIGCSHARP +#define TYPEMAP_OUT_INIT $result = 0; +#else +#define TYPEMAP_OUT_INIT +#endif // Test obscure bug where named typemaps where not being applied when symbol name contained a number %typemap(out) double "_typemap_for_double_no_compile_" -%typemap(out) double ABCD::meth "$1 = 0.0;" -%typemap(out) double ABCD::m1 "$1 = 0.0;" -%typemap(out) double ABCD::_x2 "$1 = 0.0;" -%typemap(out) double ABCD::y_ "$1 = 0.0;" -%typemap(out) double ABCD::_3 "$1 = 0.0;" +%typemap(out) double ABCD::meth {$1 = 0.0; TYPEMAP_OUT_INIT} +%typemap(out) double ABCD::m1 {$1 = 0.0; TYPEMAP_OUT_INIT} +%typemap(out) double ABCD::_x2 {$1 = 0.0; TYPEMAP_OUT_INIT} +%typemap(out) double ABCD::y_ {$1 = 0.0; TYPEMAP_OUT_INIT} +%typemap(out) double ABCD::_3 {$1 = 0.0; TYPEMAP_OUT_INIT} %inline %{ struct ABCD { double meth() { return 0.0; } |