Warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a7078b34ec
commit
47cecb0287
22 changed files with 30 additions and 28 deletions
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ JNIEXPORT jstring JNICALL Java_exampleJNI_point_1toString2(JNIEnv *jenv, jclass
|
||||||
char buf[80];
|
char buf[80];
|
||||||
jstring result;
|
jstring result;
|
||||||
|
|
||||||
|
(void)jcls;
|
||||||
|
|
||||||
p = *(Point **)&jpoint;
|
p = *(Point **)&jpoint;
|
||||||
sprintf(buf, "[%d,%d]", p->x, p->y);
|
sprintf(buf, "[%d,%d]", p->x, p->y);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Vector operator+(const Vector &a, const Vector &b) {
|
||||||
|
|
||||||
char *Vector::print() {
|
char *Vector::print() {
|
||||||
static char temp[512];
|
static char temp[512];
|
||||||
sprintf(temp,"Vector %x (%g,%g,%g)", this, x,y,z);
|
sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Vector operator+(const Vector &a, const Vector &b) {
|
||||||
|
|
||||||
char *Vector::print() {
|
char *Vector::print() {
|
||||||
static char temp[512];
|
static char temp[512];
|
||||||
sprintf(temp,"Vector %x (%g,%g,%g)", this, x,y,z);
|
sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Vector operator+(const Vector &a, const Vector &b) {
|
||||||
|
|
||||||
char *Vector::print() {
|
char *Vector::print() {
|
||||||
static char temp[512];
|
static char temp[512];
|
||||||
sprintf(temp,"Vector %x (%g,%g,%g)", this, x,y,z);
|
sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Vector operator+(const Vector &a, const Vector &b) {
|
||||||
|
|
||||||
char *Vector::print() {
|
char *Vector::print() {
|
||||||
static char temp[512];
|
static char temp[512];
|
||||||
sprintf(temp,"Vector %x (%g,%g,%g)", this, x,y,z);
|
sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Vector operator+(const Vector &a, const Vector &b) {
|
||||||
|
|
||||||
char *Vector::print() {
|
char *Vector::print() {
|
||||||
static char temp[512];
|
static char temp[512];
|
||||||
sprintf(temp,"Vector %x (%g,%g,%g)", this, x,y,z);
|
sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int count(char *bytes, int len, char c) {
|
||||||
void capitalize(char *str, int len) {
|
void capitalize(char *str, int len) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
str[i] = toupper(str[i]);
|
str[i] = (char)toupper(str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Vector operator+(const Vector &a, const Vector &b) {
|
||||||
|
|
||||||
char *Vector::print() {
|
char *Vector::print() {
|
||||||
static char temp[512];
|
static char temp[512];
|
||||||
sprintf(temp,"Vector %x (%g,%g,%g)", this, x,y,z);
|
sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ void print_vars() {
|
||||||
printf("cvar = %c\n", cvar);
|
printf("cvar = %c\n", cvar);
|
||||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||||
printf("iptrvar = %x\n", iptrvar);
|
printf("iptrvar = %p\n", iptrvar);
|
||||||
printf("name = %s\n", name);
|
printf("name = %s\n", name);
|
||||||
printf("ptptr = %x (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||||
printf("status = %d\n", status);
|
printf("status = %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue