Huge cleanup, I switched to compile with
-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit
-Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat
-Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow
-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
- HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch]
encoding.h entities.c error.c list.[ch] nanoftp.c
nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c
testSAX.c testURI.c testXPath.c tree.[ch] uri.c
valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c
xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c:
Cleanup, staticfied a number of non-exported functions,
detected and cleaned up a dozen of problem found this way,
avoided a lot of public function name/typedef/system names clashes
- doc/xml.html: updated
- configure.in: switched private flags to the really pedantic ones.
Daniel
diff --git a/uri.c b/uri.c
index 2334ec9..183bef3 100644
--- a/uri.c
+++ b/uri.c
@@ -556,7 +556,7 @@
*
* Make sure the xmlURI struct is free of content
*/
-void
+static void
xmlCleanURI(xmlURIPtr uri) {
if (uri == NULL) return;
@@ -1064,7 +1064,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIFragment(xmlURIPtr uri, const char **str) {
const char *cur = *str;
@@ -1090,7 +1090,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIQuery(xmlURIPtr uri, const char **str) {
const char *cur = *str;
@@ -1116,7 +1116,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIScheme(xmlURIPtr uri, const char **str) {
const char *cur;
@@ -1148,7 +1148,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIOpaquePart(xmlURIPtr uri, const char **str) {
const char *cur;
@@ -1190,7 +1190,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIServer(xmlURIPtr uri, const char **str) {
const char *cur;
const char *host, *tmp;
@@ -1324,7 +1324,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIRelSegment(xmlURIPtr uri, const char **str) {
const char *cur;
@@ -1359,7 +1359,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash) {
const char *cur;
@@ -1439,7 +1439,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIAuthority(xmlURIPtr uri, const char **str) {
const char *cur;
int ret;
@@ -1489,7 +1489,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseURIHierPart(xmlURIPtr uri, const char **str) {
int ret;
const char *cur;
@@ -1538,7 +1538,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseAbsoluteURI(xmlURIPtr uri, const char **str) {
int ret;
@@ -1570,7 +1570,7 @@
*
* Returns 0 or the error code
*/
-int
+static int
xmlParseRelativeURI(xmlURIPtr uri, const char **str) {
int ret = 0;
const char *cur;
@@ -1712,7 +1712,7 @@
xmlChar *
xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
xmlChar *val = NULL;
- int ret, len, index, cur, out;
+ int ret, len, indx, cur, out;
xmlURIPtr ref = NULL;
xmlURIPtr bas = NULL;
xmlURIPtr res = NULL;
@@ -1908,14 +1908,14 @@
* string.
*/
if (ref->path != NULL && ref->path[0] != 0) {
- index = 0;
+ indx = 0;
/*
* Ensure the path includes a '/'
*/
if ((out == 0) && (bas->server != NULL))
res->path[out++] = '/';
- while (ref->path[index] != 0) {
- res->path[out++] = ref->path[index++];
+ while (ref->path[indx] != 0) {
+ res->path[out++] = ref->path[indx++];
}
}
res->path[out] = 0;