diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2014-05-24 00:14:01 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2014-05-24 13:13:32 +0100 |
commit | f39ed94419e4a30b8b2ba1d49c138fd245010262 (patch) | |
tree | 532ab2db45a5e048f7a5203637b6bc0529732a7f /Examples/perl5 | |
parent | 879296f71bcfd56a7659355942c784176ae06e6c (diff) | |
download | swig-f39ed94419e4a30b8b2ba1d49c138fd245010262.tar.gz |
Fix compiler warnings in examples when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type
Diffstat (limited to 'Examples/perl5')
-rw-r--r-- | Examples/perl5/extend/example.h | 2 | ||||
-rw-r--r-- | Examples/perl5/reference/example.cxx | 2 | ||||
-rw-r--r-- | Examples/perl5/value/example.i | 2 | ||||
-rw-r--r-- | Examples/perl5/variables/example.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/Examples/perl5/extend/example.h b/Examples/perl5/extend/example.h index b27ab9711..ca1aed28f 100644 --- a/Examples/perl5/extend/example.h +++ b/Examples/perl5/extend/example.h @@ -14,7 +14,7 @@ public: virtual std::string getTitle() { return getPosition() + " " + getName(); } virtual std::string getName() { return name; } virtual std::string getPosition() const { return "Employee"; } - virtual ~Employee() { printf("~Employee() @ %p\n", this); } + virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); } }; diff --git a/Examples/perl5/reference/example.cxx b/Examples/perl5/reference/example.cxx index 8a513bf49..9dbaed2ee 100644 --- a/Examples/perl5/reference/example.cxx +++ b/Examples/perl5/reference/example.cxx @@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) { char *Vector::print() { static char temp[512]; - sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z); + sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z); return temp; } diff --git a/Examples/perl5/value/example.i b/Examples/perl5/value/example.i index 98fd60ed5..39663c6b8 100644 --- a/Examples/perl5/value/example.i +++ b/Examples/perl5/value/example.i @@ -26,7 +26,7 @@ Vector *new_Vector(double x, double y, double z) { } void vector_print(Vector *v) { - printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z); + printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z); } %} diff --git a/Examples/perl5/variables/example.c b/Examples/perl5/variables/example.c index 05e17c8c5..85685fe72 100644 --- a/Examples/perl5/variables/example.c +++ b/Examples/perl5/variables/example.c @@ -52,9 +52,9 @@ void print_vars() { printf("cvar = %c\n", cvar); printf("strvar = %s\n", strvar ? strvar : "(null)"); printf("cstrvar = %s\n", cstrvar); - printf("iptrvar = %p\n", iptrvar); + printf("iptrvar = %p\n", (void *)iptrvar); printf("name = %s\n", name); - printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0); + printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0); printf("pt = (%d, %d)\n", pt.x, pt.y); printf("status = %d\n", status); } |