- From: Sam Varshavchik <mrsam@courier-mta.com>
- Date: Wed, 04 Jan 2006 21:48:20 -0500
- To: www-lib@w3.org
Received on Thursday, 5 January 2006 02:48:19 UTC
gcc is smart enough to figure out that HTAssoc_name() may potentially return
a NULL, which is a no-no argument to strcmp().
Unfortunately, gcc isn't smart enough to figure out that the NULL codepath
can never occur, and optimize it away. Instead, it whines no less than a
dozen times, in a row.
Index: Library/src/HTAssoc.c
===================================================================
RCS file: /cvsroot/lpmtool/libwww/Library/src/HTAssoc.c,v
retrieving revision 1.1.1.1
diff -U3 -r1.1.1.1 HTAssoc.c
--- Library/src/HTAssoc.c 5 Jan 2006 01:08:49 -0000 1.1.1.1
+++ Library/src/HTAssoc.c 5 Jan 2006 02:46:16 -0000
@@ -129,7 +129,7 @@
HTAssocList * cur = list;
HTAssoc * assoc;
while ((assoc = (HTAssoc *) HTAssocList_nextObject(cur))) {
- if (!strcmp(HTAssoc_name(assoc), name))
+ if (!strcmp(assoc->name, name))
return HTAssoc_value(assoc);
}
}
Received on Thursday, 5 January 2006 02:48:19 UTC