]> err.no Git - sope/commitdiff
fixed gcc 4.0 warnings
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 27 Jul 2005 12:33:34 +0000 (12:33 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 27 Jul 2005 12:33:34 +0000 (12:33 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@941 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-gdl1/MySQL/ChangeLog
sope-gdl1/MySQL/MySQL4Channel+Model.m
sope-gdl1/MySQL/MySQL4Channel.m
sope-gdl1/MySQL/NSData+MySQL4Val.m
sope-gdl1/MySQL/NSString+MySQL4Val.m
sope-gdl1/MySQL/Version

index 5c75ebbb33a1801fbc714c204d75822bcf451c24..d4dd5e72c4f6f4cd9396892fc142c345787cad2e 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-27  Helge Hess  <helge.hess@skyrix.com>
+
+       * fixed gcc 4.0 warnings (char signedness) (v4.5.11)
+
 2005-04-23  Helge Hess  <helge.hess@opengroupware.org>
 
        * GNUmakefile.preamble: fixed include flags (v4.5.10)
index 06a6c2e7f78087c92402b37502831d5300e89c7d..173c52915f1662f15e3368212b9d586983f163d4 100644 (file)
   int cnt, tc = [_tableNames count];
 
   for (cnt = 0; cnt < tc; cnt++) {
-    NSMutableDictionary *relNamesUsed         =
-      [NSMutableDictionary dictionaryWithCapacity:16];
-    NSMutableArray      *classProperties      =
-      [NSMutableArray arrayWithCapacity:16];
-    NSMutableArray      *primaryKeyAttributes =
-      [NSMutableArray arrayWithCapacity:2];
-    NSString *tableName  = [_tableNames objectAtIndex:cnt];
-    NSArray  *attributes = [self _attributesForTableName:tableName];
-    NSArray  *pkeys      = [self _primaryKeysNamesForTableName:tableName];
-    NSArray  *fkeys      = [self _foreignKeysForTableName:tableName];
-    EOEntity *entity     = [[EOEntity new] autorelease];
-    int      cnt2;
-    int      ac  = [attributes count];
-    int      fkc = [fkeys      count];
-
+    NSMutableDictionary *relNamesUsed;
+    NSMutableArray      *classProperties, *primaryKeyAttributes;
+    NSString *tableName;
+    NSArray  *attributes, *pkeys, *fkeys;
+    EOEntity *entity;
+    int      cnt2, ac, fkc;
+    
+    relNamesUsed         = [NSMutableDictionary dictionaryWithCapacity:16];
+    classProperties      = [NSMutableArray arrayWithCapacity:16];
+    primaryKeyAttributes = [NSMutableArray arrayWithCapacity:2];
+    tableName            = [_tableNames objectAtIndex:cnt];
+    attributes           = [self _attributesForTableName:tableName];
+    pkeys                = [self _primaryKeysNamesForTableName:tableName];
+    fkeys                = [self _foreignKeysForTableName:tableName];
+    entity               = [[[EOEntity alloc] init] autorelease];
+    ac                   = [attributes count];
+    fkc                  = [fkeys      count];
+    
     [entity setName:[tableName _mySQL4ModelMakeClassName]];
     [entity setClassName:
-              [@"EO" stringByAppendingString:[tableName _mySQL4ModelMakeClassName]]];
+              [@"EO" stringByAppendingString:
+                  [tableName _mySQL4ModelMakeClassName]]];
     [entity setExternalName:tableName];
     [classProperties addObjectsFromArray:[entity classProperties]];
     [primaryKeyAttributes addObjectsFromArray:[entity primaryKeyAttributes]];
     [entity setPrimaryKeyAttributes:primaryKeyAttributes];
     
     for (cnt2 = 0; cnt2 < fkc; cnt2++) {
-      NSDictionary   *fkey             = [fkeys objectAtIndex:cnt2];
-      NSMutableArray *classProperties  =
-        AUTORELEASE([NSMutableArray new]);
-      NSString       *sa               = [fkey objectForKey:@"sourceAttr"];
-      NSString       *da               = [fkey objectForKey:@"targetAttr"];
-      NSString       *dt               = [fkey objectForKey:@"targetTable"];
-      EORelationship *rel              = 
-        [[[EORelationship alloc] init] autorelease];
-      EOJoin         *join             = 
-        [[[EOJoin alloc] init] autorelease];
-      NSString       *relName          = nil;
-
+      NSDictionary   *fkey;
+      NSMutableArray *classProperties;
+      NSString       *sa, *da, *dt;
+      EORelationship *rel;
+      EOJoin         *join; // TODO: fix me, EOJoin is deprecated
+      NSString       *relName;
+      
+      fkey             = [fkeys objectAtIndex:cnt2];
+      classProperties  = [NSMutableArray arrayWithCapacity:8];
+      sa               = [fkey objectForKey:@"sourceAttr"];
+      da               = [fkey objectForKey:@"targetAttr"];
+      dt               = [fkey objectForKey:@"targetTable"];
+      rel              = [[[EORelationship alloc] init] autorelease];
+
+      // TODO: fix me
+      join = [[[NSClassFromString(@"EOJoin") alloc] init] autorelease];
+      
       if ([pkeys containsObject:sa]) {
         relName = [@"to" stringByAppendingString:
                      [dt _mySQL4ModelMakeClassName]];
index 24b39f12cdbda7bb31d534fbb6d476a4d719ea2e..89fd9930edf5b66dc11b31134c2839e65b2462a8 100644 (file)
@@ -115,7 +115,7 @@ static int openConnectionCount = 0;
 }
 
 - (BOOL)openChannel {
-  const unsigned char *cDBName;
+  const char *cDBName;
   MySQL4Adaptor *adaptor;
   NSString *host, *socket;
   void *rc;
index 42795d2608fcbbdb1991369d430ae3495fd93d26..13d6419bafeb94556507f28bc545e151726be29b 100644 (file)
@@ -37,7 +37,7 @@
   return [self initWithBytes:&_value length:sizeof(double)];
 }
 - (id)initWithMySQL4Text:(const unsigned char *)_value {
-  return [self initWithBytes:_value length:strlen(_value)];
+  return [self initWithBytes:_value length:strlen((char *)_value)];
 }
 - (id)initWithMySQL4Data:(const void *)_value length:(int)_length {
   return [self initWithBytes:_value length:_length];
index df4c1199fc8e37b975e08ce4287eedead3933b88..59549dd0c4a62e807eb98259884b957c5f2e312b 100644 (file)
@@ -121,7 +121,7 @@ static Class EOExprClass = Nil;
     return [s autorelease];
   }
   case 'i': case 'I': { // int
-    unsigned char buf[128];
+    char buf[128];
     sprintf(buf, "%i", [self intValue]);
     return [NSString stringWithCString:buf];
   }
index c7825e078ab1a600cba9b22cbe0e1d7cdea587b8..6f0aa7829c88bd09724d4e1ece6c718b2532e219 100644 (file)
@@ -1,3 +1,3 @@
 # Version file
 
-SUBMINOR_VERSION:=10
+SUBMINOR_VERSION:=11