From c13a3081b3617d83d8e8b8e732363f57d58e9663 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 25 Jun 2003 09:36:59 +0000 Subject: [PATCH] warning fix git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4925 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/DOH/memory.c | 4 ++-- Source/Modules/pike.cxx | 2 +- Source/Modules/s-exp.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/DOH/memory.c b/Source/DOH/memory.c index f599c2359..5b671d7cb 100644 --- a/Source/DOH/memory.c +++ b/Source/DOH/memory.c @@ -187,13 +187,13 @@ DohMemoryDebug(void) { else if (p->ptr[i].type == &DohHashType) numhash++; } } - printf(" Pool %8x: size = %10d. used = %10d. free = %10d\n", p, p->len, nused, nfree); + printf(" Pool %8p: size = %10d. used = %10d. free = %10d\n", p, p->len, nused, nfree); totsize += p->len; totused+= nused; totfree+= nfree; p = p->next; } - printf("\n Total: size = %d, used = %d, free = %d\n", totsize, totused, totfree); + printf("\n Total: size = %10d, used = %10d, free = %10d\n", totsize, totused, totfree); printf("\nObject types\n"); printf(" Strings : %d\n", numstring); diff --git a/Source/Modules/pike.cxx b/Source/Modules/pike.cxx index 50aa2cdaa..22867bedc 100644 --- a/Source/Modules/pike.cxx +++ b/Source/Modules/pike.cxx @@ -235,7 +235,7 @@ public: * ------------------------------------------------------------ */ void add_method(Node *n, const DOHString_or_char *name, const DOHString_or_char *function, const DOHString_or_char *description) { - String *rename; + String *rename = NULL; switch (current) { case NO_CPP: rename = NewString(name); diff --git a/Source/Modules/s-exp.cxx b/Source/Modules/s-exp.cxx index f6b3ff6d9..566e6359d 100644 --- a/Source/Modules/s-exp.cxx +++ b/Source/Modules/s-exp.cxx @@ -186,8 +186,8 @@ public: flush_parens(); // Following is a silly hack. It works around the limitation of // DOH's hash tables that only work with string keys! - char address[16]; - sprintf(address, "%x%c", (unsigned long)obj, list_p ? 'L' : 'O'); + char address[32]; + sprintf(address, "%p%c", obj, list_p ? 'L' : 'O'); DOH *placeholder = Getattr(print_circle_hash, address); if (placeholder) { Printv(out, placeholder, NIL);