various warning fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-06-21 23:25:20 +00:00
commit 3463ced917
5 changed files with 22 additions and 17 deletions

View file

@ -20,7 +20,7 @@ extern int gcd(int x, int y);
SCM *v;
if (!(SCM_NIMP($input) && SCM_VECTORP($input))) {
SWIG_exception(SWIG_ValueError, "Expecting a vector");
return;
return 0;
}
$1 = SCM_LENGTH($input);
if ($1 == 0) {
@ -32,7 +32,7 @@ extern int gcd(int x, int y);
if (!(SCM_NIMP(v[i]) && SCM_STRINGP(v[i]))) {
free($2);
SWIG_exception(SWIG_ValueError, "Vector items must be strings");
return;
return 0;
}
$2[i] = SCM_CHARS(v[i]);
}

View file

@ -2,6 +2,12 @@
%module example;
%{
void divide_l(int a, int b, int *quotient_p, int *remainder_p);
void divide_v(int a, int b, int *quotient_p, int *remainder_p);
void divide_mv(int a, int b, int *quotient_p, int *remainder_p);
%}
/* Multiple values as lists. By default, if more than one value is to
be returned, a list of the values is created and returned; to switch
back to this behavior, use: */

View file

@ -7,26 +7,25 @@ using namespace std;
class Bar
{
public:
virtual void bar ()
{
cout << "bar" << endl;
}
virtual void bar () {
cout << "bar" << endl;
}
virtual ~Bar() {}
};
class Foo
{
public:
virtual void foo ()
{
cout << "foo" << endl;
}
virtual void foo () {
cout << "foo" << endl;
}
virtual ~Foo() {}
};
class Foo_Bar : public Foo, public Bar
{
public:
virtual void fooBar ()
{
cout << "foobar" << endl;
}
virtual void fooBar () {
cout << "foobar" << endl;
}
};

View file

@ -23,7 +23,7 @@ Zoo::~Zoo()
IterType iter = this->animals.begin();
IterType end = this->animals.end();
for(iter; iter != end; ++iter)
for(; iter != end; ++iter)
{
Animal* animal = *iter;
delete animal;

View file

@ -73,7 +73,7 @@ static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
callback = SWIG_csharp_exceptions[code].callback;
}
callback(msg);
@ -81,7 +81,7 @@ static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes
static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
callback = SWIG_csharp_exceptions_argument[code].callback;
}
callback(msg, param_name);