diff options
Diffstat (limited to 'Examples/javascript')
-rw-r--r-- | Examples/javascript/reference/example.cxx | 2 | ||||
-rw-r--r-- | Examples/javascript/variables/example.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Examples/javascript/reference/example.cxx b/Examples/javascript/reference/example.cxx index 8a513bf49..9dbaed2ee 100644 --- a/Examples/javascript/reference/example.cxx +++ b/Examples/javascript/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/javascript/variables/example.cxx b/Examples/javascript/variables/example.cxx index f10390a9e..15314b383 100644 --- a/Examples/javascript/variables/example.cxx +++ b/Examples/javascript/variables/example.cxx @@ -57,9 +57,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); } |