From a71a8ef127c8811db2ebbce8086d6e2a8f3d241e Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Wed, 6 Aug 2003 04:43:55 +0000 Subject: [PATCH] further small changes to elminate most of the remaining warnings. * error.c trionan.[ch] testThreads.c python/generator.py: further small changes to elminate most of the remaining warnings. --- ChangeLog | 6 ++++++ error.c | 1 - python/generator.py | 5 +++-- testThreads.c | 2 +- trionan.c | 7 ++++++- trionan.h | 7 +++++-- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0838c00..03670fe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Aug 6 12:32:11 HKT 2003 William Brack + + * error.c trionan.[ch] testThreads.c python/generator.py: + further small changes to elminate most of the remaining + warnings. + Tue Aug 5 23:51:21 HKT 2003 William Brack * error.c HTMLparser.c testC14N.c testHTML.c testURI.c diff --git a/error.c b/error.c index 70710300..5b5c2891 100644 --- a/error.c +++ b/error.c @@ -11,7 +11,6 @@ #include #include -#include /* for char constants */ #include #include #include diff --git a/python/generator.py b/python/generator.py index c65728c6..732b8b93 100755 --- a/python/generator.py +++ b/python/generator.py @@ -365,8 +365,8 @@ def print_function_wrapper(name, output, export, include): if args[1][1] == "char *" or args[1][1] == "xmlChar *": c_call = "\n if (%s->%s != NULL) xmlFree(%s->%s);\n" % ( args[0][0], args[1][0], args[0][0], args[1][0]) - c_call = c_call + " %s->%s = xmlStrdup((const xmlChar *)%s);\n" % (args[0][0], - args[1][0], args[1][0]) + c_call = c_call + " %s->%s = (%s)xmlStrdup((const xmlChar *)%s);\n" % (args[0][0], + args[1][0], args[1][1], args[1][0]) else: c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0], args[1][0]) @@ -553,6 +553,7 @@ def buildStubs(): # wrapper.write("#include \"config.h\"\n") wrapper.write("#include \n") wrapper.write("#include \n") + wrapper.write("#include \n") wrapper.write("#include \"libxml_wrap.h\"\n") wrapper.write("#include \"libxml2-py.h\"\n\n") for function in functions.keys(): diff --git a/testThreads.c b/testThreads.c index 1479d8d3..24633eee 100644 --- a/testThreads.c +++ b/testThreads.c @@ -84,7 +84,7 @@ thread_specific_data(void *private_data) } int -main() +main(void) { unsigned int i, repeat; unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]); diff --git a/trionan.c b/trionan.c index 7e48b36e..2e276d8a 100644 --- a/trionan.c +++ b/trionan.c @@ -500,7 +500,8 @@ TRIO_ARGS1((number), #endif } - +#if 0 + /* Temporary fix - this routine is not used anywhere */ /** Check for finity. @@ -542,6 +543,7 @@ TRIO_ARGS1((number), #endif } +#endif /* * The sign of NaN is always false @@ -729,6 +731,8 @@ TRIO_ARGS1((number), return is_negative; } +#if 0 + /* Temporary fix - this routine is not used in libxml */ /** Examine the class of a number. @@ -745,6 +749,7 @@ TRIO_ARGS1((number), return trio_fpclassify_and_signbit(number, &dummy); } +#endif /** @} SpecialQuantities */ diff --git a/trionan.h b/trionan.h index bed0c120..c5de32b0 100644 --- a/trionan.h +++ b/trionan.h @@ -66,11 +66,14 @@ TRIO_PUBLIC int trio_isinf TRIO_PROTO((double number)); /* * If number is finite return non-zero, otherwise return zero. */ +#if 0 + /* Temporary fix - these 2 routines not used in libxml */ TRIO_PUBLIC int trio_isfinite TRIO_PROTO((double number)); -TRIO_PUBLIC int trio_signbit TRIO_PROTO((double number)); - TRIO_PUBLIC int trio_fpclassify TRIO_PROTO((double number)); +#endif + +TRIO_PUBLIC int trio_signbit TRIO_PROTO((double number)); TRIO_PUBLIC int trio_fpclassify_and_signbit TRIO_PROTO((double number, int *is_negative));