]> err.no Git - sope/commitdiff
removed gcc 4.0 warnings
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 2 May 2005 22:30:25 +0000 (22:30 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 2 May 2005 22:30:25 +0000 (22:30 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@781 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-xml/STXSaxDriver/ChangeLog
sope-xml/STXSaxDriver/Model/StructuredTextBodyElement.m
sope-xml/STXSaxDriver/Version
sope-xml/libxmlSAXDriver/ChangeLog
sope-xml/libxmlSAXDriver/GNUmakefile.preamble
sope-xml/libxmlSAXDriver/Version
sope-xml/libxmlSAXDriver/libxmlDocSAXDriver.m
sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m
sope-xml/libxmlSAXDriver/libxmlSAXDriver.m
sope-xml/libxmlSAXDriver/libxmlSAXLocator.m

index a679446861ccf3fce0b18a3cb2f068e3fb2d507e..cca02cd9a574404ebcc2f65c8394f12bfe160a24 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * Model/StructuredTextBodyElement.m: fixed a gcc 4.0 warning (v1.0.11)
+
 2004-11-04  Helge Hess  <helge.hess@skyrix.com>
 
        * use Version file for install directory location
index db9ae93c8434f46199acf5c5c98d74e02363df07..0b2b48e80ce131c05a82d81fd7d8ce1665302cf8 100644 (file)
@@ -63,7 +63,7 @@ static BOOL debugOn = NO;
   return _elements;
 }
 
-- (void)addElement:(NSObject *)anElement {
+- (void)addElement:(StructuredTextBodyElement *)anElement {
   if (anElement == nil)
     return;
 
index c75b4c32d5c65702bde28ef2ecf633a40e9a05da..cf8d2d7ac2666ff2df9fdddfbff8214c58b5a7d3 100644 (file)
@@ -2,4 +2,4 @@
 
 MAJOR_VERSION=1
 MINOR_VERSION=0
-SUBMINOR_VERSION:=10
+SUBMINOR_VERSION:=11
index 0922e64f3cbf4e46c4290719b8cae2d84f5c82e2..56d23123f3f45b1e153723fbfff599f850c58508 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-03  Helge Hess  <helge.hess@opengroupware.org>
+
+       * fixed loads of gcc 4.0 warnings (v4.5.18)
+
 2004-12-14  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * libxmlSAXDriver.xcode: minor fixes
index 7b69b3a8992c3faf75d1320b0efebceab25e469d..4b5d5e5615e12ea5e04a93753ba4a5215b2608cd 100644 (file)
@@ -1,4 +1,6 @@
-# $Id$
+# compilation settings
+
+ADDITIONAL_CPPFLAGS += -funsigned-char
 
 ADDITIONAL_INCLUDE_DIRS += -I../.. -I..
 ADDITIONAL_INCLUDE_DIRS += $(shell xml2-config --cflags)
index c74af8851c4f0edc37d5f611a0ab55b743d23032..beecb228a39fbbf2fd6de864b72ca89a7003d053 100644 (file)
@@ -1,3 +1,3 @@
 # version
 
-SUBMINOR_VERSION:=17
+SUBMINOR_VERSION:=18
index e0d51d99a9948e551f503a735f708d13d6f2beb6..1656527d39d78435daf8e8fe7c1daee3c96c48c1 100644 (file)
@@ -46,7 +46,7 @@ static inline NSString *xmlCharsToString(const xmlChar *_s) {
   static Class NSStringClass = Nil;
   if (NSStringClass == Nil)
     NSStringClass = [NSString class];
-  return _s ? [[NSStringClass alloc] initWithUTF8String:_s] : nil;
+  return _s ? [[NSStringClass alloc] initWithUTF8String:(const char*)_s] : nil;
 }
 
 static NSString *SaxDeclHandlerProperty =
@@ -411,8 +411,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
       void     *data, *ts;
       unsigned len;
       
-      len = strlen(chars);
-      
+      len = strlen((char *)chars);
       data = ts = calloc(len + 1, sizeof(unichar)); /* GC ?! */
       
       if (_UTF8ToUTF16((void *)&chars, (void *)(chars + len),
@@ -453,8 +452,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
       void     *data, *ts;
       unsigned len;
     
-      len = strlen(chars);
-
+      len = strlen((const char *)chars);
       data = ts = calloc(len + 1, sizeof(unichar)); /* GC ?! */
   
       if (_UTF8ToUTF16((void *)&chars, (void *)(chars + len),
index 77efd093c2c087e4f3b54390776d6f9c55388ec6..a6523d8eee44ca61e28f0671559d1258c80fa9f7 100644 (file)
@@ -54,11 +54,11 @@ static Class      NSStringClass = Nil;
         localisations ... why doesn't libxml support error codes ?
         (or does it ?)
 */
-static const unsigned char *tagInvalidMsg = "tag %s invalid";
-static const unsigned char *unclosedEntityInvalidMsg = 
+static const char *tagInvalidMsg = "tag %s invalid";
+static const char *unclosedEntityInvalidMsg = 
   "htmlParseEntityRef: expecting ';'";
 #if 0
-static const unsigned char *unexpectedNobrCloseMsg = 
+static const char *unexpectedNobrCloseMsg = 
   "Unexpected end tag : %s";
 #endif
 
@@ -78,13 +78,13 @@ static inline NSString *xmlCharsToString(const xmlChar *_s) {
     return [s retain];
   }
   
-  newkey = malloc(strlen(_s) + 1);
-  strcpy(newkey, _s);
+  newkey = malloc(strlen((char *)_s) + 2);
+  strcpy(newkey, (char *)_s);
   
   if (NSStringClass == Nil)
     NSStringClass = [NSString class];
   
-  s = [[NSStringClass alloc] initWithUTF8String:_s];
+  s = [[NSStringClass alloc] initWithUTF8String:(const char *)_s];
   NSMapInsert(uniqueStrings, newkey, s);
   return s;
 }
@@ -484,7 +484,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
     [self->contentHandler characters:&c length:0];
     return YES;
   }
-  if ((len = strlen(chars)) == 0) {
+  if ((len = strlen((char *)chars)) == 0) {
     unichar c = '\0';
     [self->contentHandler characters:&c length:0];
     return YES;
@@ -530,7 +530,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
     else {
       unsigned len;
       
-      if ((len = strlen(chars)) > 0) {
+      if ((len = strlen((char *)chars)) > 0) {
         void *data, *ts;
         
         data = ts = calloc(len + 1, sizeof(unichar)); /* GC ?! */
index a42975de10a9d1496462ba5da4ee8eb9605d43f8..fc0fa91526f500494b0ac303c93b4c73b2220c6d 100644 (file)
@@ -54,7 +54,9 @@ static inline NSString *xmlCharsToString(const xmlChar *_s) {
   char *newkey;
   
   if (_s == NULL) return nil;
-  
+
+  // TODO: does the uniquer really make sense?
+  //       best would to have an -initWithUTF...nocopy:YES
   if (uniqueStrings == NULL) {
     uniqueStrings = NSCreateMapTable(libxmlNonOwnedCStringMapKeyCallBacks,
                                      NSObjectMapValueCallBacks,
@@ -64,14 +66,14 @@ static inline NSString *xmlCharsToString(const xmlChar *_s) {
     /* found a string in cache ... */
     return [s retain];
   }
-
-  newkey = malloc(strlen(_s) + 1);
-  strcpy(newkey, _s);
+  
+  newkey = malloc(strlen((const char *)_s) + 2);
+  strcpy(newkey, (const char *)_s);
   
   if (NSStringClass == Nil)
     NSStringClass = [NSString class];
   
-  s = [[NSStringClass alloc] initWithUTF8String:_s];
+  s = [[NSStringClass alloc] initWithUTF8String:(const char *)_s];
   NSMapInsert(uniqueStrings, newkey, s);
   return s;
 }
@@ -431,7 +433,7 @@ static xmlSAXHandler saxHandler = {
     if (len > 5) {
       unsigned char *tmp;
       
-      if ((tmp = strstr(src, "<?xml"))) {
+      if ((tmp = (unsigned char *)strstr((char *)src, "<?xml"))) {
         if (tmp != src) {
           /* skip leading spaces till <?xml ...*/
           while (*start != '\0' && isspace(*start)) {
@@ -448,8 +450,7 @@ static xmlSAXHandler saxHandler = {
     }
     activeDriver = self;
     
-    self->ctxt =
-      xmlCreateMemoryParserCtxt(start, len);
+    self->ctxt = xmlCreateMemoryParserCtxt((void *)start, len);
     
     if (self->ctxt == nil) {
       SaxParseException *e;
@@ -789,9 +790,9 @@ _startElement(libxmlSAXDriver *self, const xmlChar *name, const xmlChar **atts)
 
       if (!self->fNamespacePrefixes) {
         if (atts[i][0] == 'x') {
-          const char *an = atts[i];
+          const unsigned char *an = atts[i];
         
-          if (strstr(an, "xmlns") == an)
+          if (strstr((char *)an, "xmlns") == (char *)an)
             continue;
         }
       }
@@ -987,7 +988,7 @@ static void _comment(libxmlSAXDriver *self, const xmlChar *value) {
     unichar *data;
     register int i, len;
     
-    len = strlen(value);
+    len = strlen((const char *)value);
     
     data = calloc(len +1 ,sizeof(unichar)); /* GC ?! */
 
@@ -1056,7 +1057,7 @@ static xmlEntityPtr _getEntity(libxmlSAXDriver *self, const xmlChar *name) {
   
   /* fill entity structure */
   p = self->entity;
-  p->name    = [ename cString];
+  p->name    = (unsigned char *)[ename cString];
   p->etype   = XML_INTERNAL_GENERAL_ENTITY;
   p->orig    = (void *)[ename cString];
   p->content = (void *)[s cString];
index 27098a7be9449dd09fd719addac76fc2aa591e70..e0b9505fa8bd0ca3d8606449746e2377609c427b 100644 (file)
   const xmlChar *s;
   //return nil;
   s = self->getPublicId ? self->getPublicId(self->ctx) : NULL;
-  return s ? [NSString stringWithCString:s] : nil;
+  return s ? [NSString stringWithCString:(const char *)s] : nil;
 }
 
 - (NSString *)systemId {
   const xmlChar *s;
   //return nil;
   s = self->getSystemId ? self->getSystemId(self->ctx) : NULL;
-  return s ? [NSString stringWithCString:s] : nil;
+  return s ? [NSString stringWithCString:(const char *)s] : nil;
 }
 
 /* description */