Various warning fixes for .NET 2003 cl /W4 to work barring one warning and for gcc -ansi -Wall -pedantic to be warning free:

const fixes and function prototype declarations matching the definition etc


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-01-15 22:46:07 +00:00
commit b0df32dd1a
24 changed files with 77 additions and 63 deletions

View file

@ -94,7 +94,7 @@ DohStr(const DOH *obj) {
if (objinfo->doh_str) {
return (objinfo->doh_str)(b);
}
sprintf(buffer,"<Object '%s' at %p>", objinfo->objname, b);
sprintf(buffer,"<Object '%s' at %p>", objinfo->objname, (void *)b);
return NewString(buffer);
} else {
return NewString(obj);

View file

@ -300,7 +300,7 @@ DohvPrintf(DOH *so, const char *format, va_list ap)
DohFree(stemp);
}
} else {
if (!doh) doh = "";
if (!doh) doh = (char *)"";
if (strlen(encoder)) {
DOH *s = NewString(doh);

View file

@ -139,7 +139,7 @@ DohObjFree(DOH *ptr) {
DohBase *b, *meta;
b = (DohBase *) ptr;
if (b->flag_intern) return;
meta = b->meta;
meta = (DohBase *)b->meta;
b->data = (void *) FreeList;
b->meta = 0;
b->type = 0;
@ -187,7 +187,7 @@ DohMemoryDebug(void) {
else if (p->ptr[i].type == &DohHashType) numhash++;
}
}
printf(" Pool %8p: size = %10d. used = %10d. free = %10d\n", p, p->len, nused, nfree);
printf(" Pool %8p: size = %10d. used = %10d. free = %10d\n", (void *)p, p->len, nused, nfree);
totsize += p->len;
totused+= nused;
totfree+= nfree;

View file

@ -520,6 +520,8 @@ end_quote(char *s)
static char *
match_simple(char *base, char *s, char *token, int tokenlen)
{
(void)base;
(void)tokenlen;
return strstr(s,token);
}
@ -561,6 +563,7 @@ match_identifier_begin(char *base, char *s, char *token, int tokenlen)
static char *
match_identifier_end(char *base, char *s, char *token, int tokenlen)
{
(void)base;
while (s) {
s = strstr(s,token);
if (!s) return 0;