]> err.no Git - sope/commitdiff
use %p for pointer formats
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 23:52:19 +0000 (23:52 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 23:52:19 +0000 (23:52 +0000)
gcc 4.1 warnings
some 64bit preps
minor code cleanups

git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1297 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

40 files changed:
sope-gdl1/FrontBase2/FBBlobHandle.m
sope-gdl1/FrontBase2/FBChannel.m
sope-gdl1/GDLAccess/ChangeLog
sope-gdl1/GDLAccess/EOAdaptor.m
sope-gdl1/GDLAccess/EOAdaptorDataSource.m
sope-gdl1/GDLAccess/EOAttribute.m
sope-gdl1/GDLAccess/EODatabase.m
sope-gdl1/GDLAccess/EODatabaseChannel.m
sope-gdl1/GDLAccess/EODatabaseContext.m
sope-gdl1/GDLAccess/EOEntity.m
sope-gdl1/GDLAccess/EOExpressionArray.m
sope-gdl1/GDLAccess/EOFaultHandler.m
sope-gdl1/GDLAccess/EOModel.m
sope-gdl1/GDLAccess/EOModelGroup.m
sope-gdl1/GDLAccess/EOObjectUniquer.m
sope-gdl1/GDLAccess/EOQualifierScanner.m
sope-gdl1/GDLAccess/EOSQLExpression.m
sope-gdl1/GDLAccess/EOSQLQualifier.m
sope-gdl1/GDLAccess/EOSelectSQLExpression.m
sope-gdl1/GDLAccess/GNUmakefile.preamble
sope-gdl1/GDLAccess/Version
sope-gdl1/GDLAccess/fhs.make
sope-gdl1/GDLContentStore/ChangeLog
sope-gdl1/GDLContentStore/GCSChannelManager.m
sope-gdl1/GDLContentStore/GCSFieldInfo.m
sope-gdl1/GDLContentStore/GCSFolder.m
sope-gdl1/GDLContentStore/GCSFolderManager.m
sope-gdl1/GDLContentStore/GCSFolderType.m
sope-gdl1/GDLContentStore/Version
sope-gdl1/MySQL/ChangeLog
sope-gdl1/MySQL/MySQL4Channel.m
sope-gdl1/MySQL/MySQL4Values.m
sope-gdl1/MySQL/Version
sope-gdl1/PostgreSQL/ChangeLog
sope-gdl1/PostgreSQL/PGConnection.m
sope-gdl1/PostgreSQL/PostgreSQL72Channel.m
sope-gdl1/PostgreSQL/Version
sope-gdl1/SQLite3/ChangeLog
sope-gdl1/SQLite3/SQLiteChannel.m
sope-gdl1/SQLite3/Version

index e6e7dcee91833fde5233d3396a2b8310e410c0f4..e87917fb9bbcad96cd1b57a18fc62166c4b21d75 100644 (file)
@@ -54,7 +54,7 @@
 }
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: id=%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: id=%@>",
                      NSStringFromClass([self class]), self,
                      [self blobID]];
 }
index f1f54616299cd9d3612d1592dde586664efe2e20..d220f18e29a1da7d9c3c3ed34e77cc896ba3e76f 100644 (file)
@@ -149,7 +149,7 @@ extern __declspec(import) void fbcInitialize(void);
                            (char *)pwdDigest);
   if (self->fbdc == NULL) {
     if (isDebuggingEnabled) {
-      NSLog(@"FrontBase channel 0x%08X (db=%@, server=%@, digest=%s) "
+      NSLog(@"FrontBase channel 0x%p (db=%@, server=%@, digest=%s) "
             @"could not be opened: %s ..", self,
             [adaptor databaseName], [adaptor serverName],
             pwdDigest /* ? "yes" : "no"*/,
@@ -180,7 +180,7 @@ extern __declspec(import) void fbcInitialize(void);
 
   md = fbcdcCreateSession(self->fbdc,
                           (char *)[[NSString stringWithFormat:
-                                               @"GDL<0x%08X>", self]
+                                               @"GDL<0x%p>", self]
                                              cString],
                           (char *)[[adaptor loginName] cString],
                           //                          pwdDigest,
@@ -188,7 +188,7 @@ extern __declspec(import) void fbcInitialize(void);
                           (char *)[NSUserName() cString]);
   if (md == NULL) {
     if (isDebuggingEnabled) {
-      NSLog(@"FrontBase session (channel=0x%08X) couldn't be created, "
+      NSLog(@"FrontBase session (channel=0x%p) couldn't be created, "
             @" login=%@ password=%s user=%@: %s.",
             self,
             [adaptor loginName], [adaptor loginPassword],
@@ -206,7 +206,7 @@ extern __declspec(import) void fbcInitialize(void);
       
       emd = fbcdcErrorMetaData(self->fbdc, md);
 
-      NSLog(@"FrontBase session (channel=0x%08X) couldn't be created:", self);
+      NSLog(@"FrontBase session (channel=0x%p) couldn't be created:", self);
       
       for (i = 0, count = fbcemdErrorCount(emd); i < count; i++) {
         unsigned   code;
@@ -259,7 +259,7 @@ extern __declspec(import) void fbcInitialize(void);
 #endif
 
   if (isDebuggingEnabled)
-    NSLog(@"FrontBase channel 0x%08X opened ..", self);
+    NSLog(@"FrontBase channel 0x%p opened ..", self);
   
   return result;
 }
@@ -871,7 +871,7 @@ extern __declspec(import) void fbcInitialize(void);
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: open=%s fetching=%s>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: open=%s fetching=%s>",
                      NSStringFromClass([self class]),
                      self,
                      [self isOpen] ? "yes" : "no",
index c52ff18e7b3b45c88229c5fe102ce40340e2b876..753d8d191a7212acc7b8de223d26038a81bbbe8e 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.56)
+
 2005-10-13  Helge Hess  <helge.hess@skyrix.com>
 
        * EOArrayProxy.m, EOPrimaryKeyDictionary.m, EOExpressionArray.m,
index f0f7f1d2dc2234043c7fca9a118feac7bc3ad311..ade6d9851615ade8d34e8d4f8551767ae5724bbb 100644 (file)
   /* Make adaptor bundle */
   bundle = adaptorBundlePath
     ? [NSBundle bundleWithPath:adaptorBundlePath]
-    : nil;
+    : (NSBundle *)nil;
     
   /* Check bundle */
   if (bundle == nil) {
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X]: name=%@ "
+                     @"<%@[0x%p]: name=%@ "
                      @"model=%s connection-dict=%s>",
                      NSStringFromClass([self class]), self,
                      [self name],
index 7768cde0868f34a91b591a3840e8ef759dc26a4e..f0dd9666447ed12308504c79a0d3fc9604bcba42 100644 (file)
@@ -846,7 +846,7 @@ static NSNotificationCenter *getNC(void ) {
 - (void)setFetchSpecification:(EOFetchSpecification *)_fs {
   if (![self->fetchSpecification isEqual:_fs]) {
 #if DEBUG && 0
-    NSLog(@"%s: 0x%08X: fetch-spec mismatch:\n%@\n%@",
+    NSLog(@"%s: 0x%p: fetch-spec mismatch:\n%@\n%@",
           __PRETTY_FUNCTION__, self,
           self->fetchSpecification, _fs);
 #endif
@@ -857,7 +857,7 @@ static NSNotificationCenter *getNC(void ) {
   }
 #if DEBUG && 0
   else {
-    NSLog(@"%s: 0x%08X: no fetch-spec mismatch:\n%@\n%@\n",
+    NSLog(@"%s: 0x%p: no fetch-spec mismatch:\n%@\n%@\n",
           __PRETTY_FUNCTION__, self,
           self->fetchSpecification, _fs);
   }
@@ -878,7 +878,7 @@ static NSNotificationCenter *getNC(void ) {
   NSMutableString *ms;
   
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self];
+  [ms appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self];
 
   if (self->fetchSpecification != nil)
     [ms appendFormat:@" fspec=%@", self->fetchSpecification];
@@ -1213,7 +1213,7 @@ static NSNotificationCenter *getNC(void ) {
     id v;
 
     v = (v = [_keyValues valueForKey:[[attr columnName] lowercaseString]])
-      ? v : null;
+      ? v : (id)null;
     
     keys[mapCnt]   = attr;
     values[mapCnt] = v;
@@ -1363,7 +1363,7 @@ static NSNotificationCenter *getNC(void ) {
   
   sqlKey   = [_adaptor formatAttribute:attr];
 
-  sqlValue = [_adaptor formatValue:self->value ? self->value : null
+  sqlValue = [_adaptor formatValue:(self->value ? self->value : (id)null)
                        forAttribute:attr];
 
   sql = nil;
index 1fc5a87b9b3a96f65589526420e32eeb9b5d7fd4..8642041c71809b7079287dfe02cc788f33ca5259 100644 (file)
@@ -434,7 +434,7 @@ static inline void _addToPropList(NSMutableDictionary *propertyList,
       NSDictionary *ui;
       
       ui = [NSDictionary dictionaryWithObjectsAndKeys:
-                           *_value ? *_value : null, @"value",
+                           *_value ? *_value : (id)null, @"value",
                            self,                     @"attribute",
                            nil];
       
@@ -466,7 +466,7 @@ static inline void _addToPropList(NSMutableDictionary *propertyList,
                              [NSNumber numberWithUnsignedInt:self->width],
                              @"maxWidth",
                              [NSNumber numberWithUnsignedInt:len], @"width",
-                             *_value ? *_value : null,             @"value",
+                            *_value ? *_value : (id)null,         @"value",
                              self,                                 @"attribute",
                              nil];
         
@@ -488,7 +488,7 @@ static inline void _addToPropList(NSMutableDictionary *propertyList,
                              [NSNumber numberWithUnsignedInt:self->width],
                              @"maxWidth",
                              [NSNumber numberWithUnsignedInt:len], @"width",
-                             *_value ? *_value : null,             @"value",
+                          *_value ? *_value : (id)null,           @"value",
                              self,                                 @"attribute",
                              nil];
         
index d56207b1fa296185f2dc5274650c2a90a146909a..362be06cdf88d97bf43b410ba2e96eb97ec20b7e 100644 (file)
@@ -245,7 +245,7 @@ static inline void _removeDatabaseInstance(EODatabase *_db) {
 
 - (void)forgetObject:(id)_object {
   /*
-    NSLog(@"DB[0x%08X]: forget object 0x%08X<%s> entity=%@",
+    NSLog(@"DB[0x%p]: forget object 0x%p<%s> entity=%@",
         self, _object, class_get_class_name(*(Class *)_object),
         [[_object entity] name]);
   */
@@ -267,7 +267,7 @@ static inline void _removeDatabaseInstance(EODatabase *_db) {
 #if 0
       if (object) {
         if (![object isKindOfClass:[EOGenericRecord class]])
-          NSLog(@"object 0x%08X pkey=%@ entity=%@", object, _key, _entity);
+          NSLog(@"object 0x%p pkey=%@ entity=%@", object, _key, _entity);
       }
 #endif
       return object;
@@ -323,8 +323,8 @@ static inline void _removeDatabaseInstance(EODatabase *_db) {
 - (void)recordObject:(id)_object
   primaryKey:(NSDictionary *)_key
   entity:(EOEntity *)_entity
-  snapshot:(NSDictionary *)_snapshot {
-
+  snapshot:(NSDictionary *)_snapshot
+{
   if (_object == nil) {
     [NSException raise:NSInvalidArgumentException
                 format:
@@ -359,9 +359,13 @@ static inline void _removeDatabaseInstance(EODatabase *_db) {
   }
 
   [objectsDictionary recordObject:_object 
-                     primaryKey:self->flags.isUniquingObjects?_key:nil
-                     entity:self->flags.isUniquingObjects ?_entity:nil
-                     snapshot:self->flags.isKeepingSnapshots?_snapshot:nil];
+                     primaryKey:
+                      self->flags.isUniquingObjects ? _key:(NSDictionary *)nil
+                     entity:self->flags.isUniquingObjects
+                      ?_entity : (EOEntity *)nil
+                     snapshot:
+                      self->flags.isKeepingSnapshots
+                      ? _snapshot : (NSDictionary *)nil];
 }
 
 - (BOOL)isObject:(id)_object 
index 2853305ddab6a11cee34414f700e91bf67bad1f4..a574521e5e8109662e162431dcc734303d5f3a09 100644 (file)
@@ -1255,7 +1255,7 @@ NSString *EODatabaseChannelDidLockObjectName =
         id nrel = [delegate databaseChannel:self
                             relationshipForRow:row
                             relationship:rel];
-        rel = nrel ? nrel : rel;
+        rel = nrel ? nrel : (id)rel;
       }
       if ([rel isToMany]) {
         // Build to-many fault
index 99346997159e7241f071044a763f1c379b862ace..8dc2931080df67611e66ae69bbd47d32314d2f1e 100644 (file)
@@ -572,9 +572,9 @@ static inline void _checkTxInProgress(EODatabaseContext *self,
     EOObjectUniquer *cache = transactionStackTop->objectsDictionary;
     
     [cache recordObject:_object 
-           primaryKey:  self->isUniquingObjects  ? _key     : nil
-           entity:      self->isUniquingObjects  ? _entity : nil
-           snapshot:    self->isKeepingSnapshots ? snapshot : nil];
+           primaryKey:  self->isUniquingObjects  ? _key   : (NSDictionary *)nil
+           entity:      self->isUniquingObjects  ? _entity : (EOEntity *)nil
+           snapshot:self->isKeepingSnapshots ? snapshot : (NSDictionary *)nil];
   }
 }
 
@@ -726,7 +726,7 @@ static inline void _checkTxInProgress(EODatabaseContext *self,
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                    @"<%@[0x%08X]: #channels=%i tx-nesting=%i>",
+                    @"<%@[0x%p]: #channels=%i tx-nesting=%i>",
                      NSStringFromClass([self class]), self,
                      [self->channels count],
                      [self transactionNestingLevel]];
@@ -757,7 +757,7 @@ static Class EODatabaseContextClass = Nil;
   EODatabaseContextClass = _cclass;
 }
 + (Class)contextClassToRegister {
-  return EODatabaseContextClass ? EODatabaseContextClass : self;
+  return EODatabaseContextClass ? EODatabaseContextClass : (Class)self;
 }
 
 - (EODatabaseChannel *)availableChannel {
index e85ae23de32b2e60941e7c134b219885a1cf6350..b15a1f9a35e4d91a5e364622ea7ce85626526de2 100644 (file)
@@ -751,7 +751,7 @@ static inline void _printIds(NSArray *a, const char *pfx, const char *indent) {
   if (indent == NULL) indent = "  ";
   printf("%s", pfx);
   for (i = 0; i < [a count]; i++)
-    printf("%s0x%08X\n", indent, (unsigned)[a objectAtIndex:i]);
+    printf("%s0x%p\n", indent, (unsigned)[a objectAtIndex:i]);
 }
 #endif
 
@@ -870,7 +870,7 @@ static inline BOOL _containsObject(NSArray *a, id obj) {
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%08X]: name=%@ className=%@ tableName=%@ "
+                     @"<%@[0x%p]: name=%@ className=%@ tableName=%@ "
                      @"readOnly=%s>",
                      NSStringFromClass([self class]), self,
                      [self name], [self className], [self externalName],
@@ -884,18 +884,20 @@ static inline BOOL _containsObject(NSArray *a, id obj) {
 @implementation EOEntity(ValuesConversion)
 
 - (NSDictionary *)convertValuesToModel:(NSDictionary *)aRow {
-  NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-  NSEnumerator        *enumerator = [aRow keyEnumerator];
+  NSMutableDictionary *dict;
+  NSEnumerator        *enumerator;
   NSString            *key;
     
-  while ((key = [enumerator nextObject])) {
+  dict = [NSMutableDictionary dictionary];
+  enumerator = [aRow keyEnumerator];
+  while ((key = [enumerator nextObject]) != nil) {
     id old = [aRow objectForKey:key];
     id new = [[self attributeNamed:key] convertValueToModel:old];
         
-    if (new) [dict setObject:new forKey:key];
+    if (new != nil) [dict setObject:new forKey:key];
   }
     
-  return [dict count] ? dict : nil;
+  return [dict count] > 0 ? dict : (NSMutableDictionary *)nil;
 }
 
 static int _compareByName(id obj1, id obj2, void * context) {
@@ -961,7 +963,7 @@ static int _compareByName(id obj1, id obj2, void * context) {
   result    = nil;
   
   e = [self->relationships objectEnumerator];
-  while ((relship = [e nextObject])) {
+  while ((relship = [e nextObject]) != nil) {
     EOEntity *targetEntity;
     EOModel  *extModel;
 
@@ -973,7 +975,7 @@ static int _compareByName(id obj1, id obj2, void * context) {
       [result addObject:extModel];
     }
   }
-  return result result : [NSArray array];
+  return result != nil ? (id)result : [NSArray array];
 }
 
 /* fetch specs */
index 2961ba9028d209a1b657d07fe91d47801125587b..c7b5d99ee2c32bc5f1f915daa18d85222f4fe22c 100644 (file)
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
 
   if (self->array)  [ms appendFormat:@" array=%@", self->array];
   if (self->prefix) [ms appendFormat:@" prefix='%@'", self->prefix];
index 4085cbc6d311c39ec491b21f6418000282450f57..6121e2a5a4d1c8e767888f14ee2fa670bebc22fe 100644 (file)
 /* description */
 
 - (NSString *)descriptionForObject:(id)_fault {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: on=%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: on=%@>",
                      NSStringFromClass(*(Class *)_fault),
                      _fault,
                      NSStringFromClass([self targetClass])];
index 93e1a8520defbe04a8f932272a21e0c953f801ca..0f25ee5f79f0182f7b9af6d74ad223bbe1243fc0 100644 (file)
@@ -203,7 +203,7 @@ void EOModel_linkCategories(void) {
 
     [self setCreateMutableObjects:NO];
   }
-  return flags.errors ? (void)AUTORELEASE(self), (id)nil : self;
+  return flags.errors ? (void)AUTORELEASE(self), (id)nil : (id)self;
 }
 
 - (id)initWithName:(NSString*)_name {
@@ -413,7 +413,7 @@ void EOModel_linkCategories(void) {
   NSString *s;
 
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
 
   if ((s = [self name]))             [ms appendFormat:@" name=%@", s];
   if ((s = [self path]))             [ms appendFormat:@" path=%@", s];
index 64839b83c6f300533ecf6c4489e2fa296ec9000b..5ec5e00a840e169f33fc3d20cbf3739f389e8f91 100644 (file)
@@ -233,7 +233,7 @@ static id<EOModelGroupClassDelegation> classDelegate = nil;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%08X]: models=%@>",
+  return [NSString stringWithFormat:@"<%@[0x%p]: models=%@>",
                      NSStringFromClass([self class]),
                      self,
                      [[self modelNames] componentsJoinedByString:@","]];
index e6057f6e07cc6d781d030c5602bf59a9474507d2..8a4dc0a13cce5c3263e59f077cf4a5223ad31945 100644 (file)
@@ -208,7 +208,7 @@ static inline void _removeUniquerInstance(EOObjectUniquer *_uniquer) {
     return;
   
   /*
-  NSLog(@"Uniquer[0x%08X]: forget object 0x%08X<%s> entity=%@",
+  NSLog(@"Uniquer[0x%p]: forget object 0x%p<%s> entity=%@",
         self, _object, class_get_class_name(*(Class *)_object),
         [[_object entity] name]);
   */
@@ -228,7 +228,7 @@ static inline void _removeUniquerInstance(EOObjectUniquer *_uniquer) {
   EOUniquerRecord *rec       = NULL;
   id              key        = nil;
   
-  NSLog(@"uniquer 0x%08X forgetAllSnapshots ..", self);
+  NSLog(@"uniquer 0x%p forgetAllSnapshots ..", self);
   
   enumerator = NSEnumerateMapTable(self->objectsToRec);
   while (NSNextMapEnumeratorPair(&enumerator, (void**)(&key), (void**)(&rec))) {
index 0286f316390f5e38680f78fc069d36abaa1a012b..dc82eecdbe71b46f5e2c7728384c54f2e82384e8 100644 (file)
@@ -86,7 +86,7 @@
 - (NSString*)convertCString:(va_list *)pString scanner:(FormatScanner*)scanner {
     char *string;
     string = va_arg(*pString, char*);
-    return string ? [NSString stringWithCString:string] : @"";
+    return string ? [NSString stringWithCString:string] : (id)@"";
 }
 
 - (NSString*)convertProperty:(va_list*)pString scanner:(FormatScanner*)scanner {
   else
     str = [str description];
 
-  return (str == nil) ? @"" : str;
+  return (str == nil) ? (id)@"" : str;
 }
 
 - (NSString *)convertProperty:(NSEnumerator **)pString
index 74781afb84eeaafd77b1057ad9ee9bac259632a3..30a69da702a829df423da3eb42177ee01f11c3e7 100644 (file)
@@ -144,9 +144,9 @@ NSString *EOBindVariableValueKey       = @"value";
 
 - (NSString *)convertValue:(va_list *)pString scanner:(FormatScanner *)scanner{
   return (self->adaptor)
-    ? [self->adaptor formatValue:self->value?self->value:(id)null 
-          forAttribute:attribute]
-      : self->value;
+    ? [self->adaptor formatValue:(self->value ? self->value : (NSString *)null)
+                    forAttribute:attribute]
+    : (id)self->value;
 }
 
 @end /* EOInsertUpdateScannerHandler */
@@ -280,7 +280,7 @@ NSString *EOBindVariableValueKey       = @"value";
                 joinClause:
                   [self joinExpressionForRelationshipPaths:relationshipPaths]
                 orderByClause:[self orderByClauseForFetchOrder:fetchOrder]
-                lockClause:flag ? [self lockClause] : nil];
+                lockClause:flag ? [self lockClause] : (NSString *)nil];
     
     self->content = [sql mutableCopy];
     
@@ -541,8 +541,9 @@ NSString *EOBindVariableValueKey       = @"value";
   withValue:(id)_value fromRow:(NSDictionary *)_row
 {
   return (self->adaptor)
-    ? [self->adaptor formatValue:_value?_value:null forAttribute:_attribute]
-    : [_value stringValue];
+    ? [self->adaptor formatValue:(_value ? _value : (id)null)
+                    forAttribute:_attribute]
+    : (id)[_value stringValue];
 }
 
 - (id)updateListForRow:(NSDictionary *)row {
@@ -573,7 +574,7 @@ NSString *EOBindVariableValueKey       = @"value";
         
     NSAssert1(attribute, @"attribute %@ should be non nil", attributeName);
     columnName = adaptor
-      ? [adaptor formatAttribute:attribute]
+      ? (NSString *)[adaptor formatAttribute:attribute]
       : [attribute columnName];
 
     value = [row objectForKey:attributeName];
@@ -609,7 +610,7 @@ NSString *EOBindVariableValueKey       = @"value";
         
     NSAssert1(attribute, @"attribute %@ should be non nil", attributeName);
     columnName = adaptor
-      ? [adaptor formatAttribute:attribute]
+      ? (NSString *)[adaptor formatAttribute:attribute]
       : [attribute columnName];
 
     if (first) first = NO;
@@ -748,11 +749,11 @@ NSString *EOBindVariableValueKey       = @"value";
     NSString *columnName = nil;
 
     columnName = adaptor
-        ? [adaptor formatAttribute:attribute]
+        ? (NSString *)[adaptor formatAttribute:attribute]
         : [attribute columnName];
 
     return alias
-        ? [NSString stringWithFormat:@"%@.%@", alias, columnName]
+        ? (NSString *)[NSString stringWithFormat:@"%@.%@", alias, columnName]
         : columnName;
 }
 
@@ -804,7 +805,7 @@ NSString *EOBindVariableValueKey       = @"value";
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:\n", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:\n", self, NSStringFromClass([self class])];
   
   if (self->entity)  [ms appendFormat:@"  entity=%@\n",  self->entity];
   if (self->adaptor) [ms appendFormat:@"  adaptor=%@\n", self->adaptor];
@@ -948,7 +949,7 @@ NSString *EOBindVariableValueKey       = @"value";
   
   s = [NSMutableString stringWithCapacity:256];
   
-  [s appendString:_selectString ? _selectString : @"SELECT"];
+  [s appendString:_selectString ? _selectString : (NSString *)@"SELECT"];
   [s appendString:@" "];
   [s appendString:_columns];
   [s appendString:@" FROM "];
@@ -1063,14 +1064,14 @@ NSString *EOBindVariableValueKey       = @"value";
   return NO;
 }
 
-- (NSMutableDictionary *)bindVariableDictionaryForAttribute:(EOAttribute *)_attr
+- (NSMutableDictionary *)bindVariableDictionaryForAttribute:(EOAttribute *)_a
   value:(id)_value
 {
   NSMutableDictionary *d;
   
   d = [NSMutableDictionary dictionaryWithCapacity:8];
-  [d setObject:_attr                  forKey:EOBindVariableAttributeKey];
-  [d setObject:_value ? _value : null forKey:EOBindVariableValueKey];
+  [d setObject:_a                         forKey:EOBindVariableAttributeKey];
+  [d setObject:_value ? _value : (id)null forKey:EOBindVariableValueKey];
   return d;
 }
 
@@ -1085,7 +1086,7 @@ NSString *EOBindVariableValueKey       = @"value";
 /* values */
 
 + (NSString *)formatValue:(id)_value forAttribute:(EOAttribute *)_attribute {
-  return _value ? _value : null;
+  return _value != nil ? _value : (id)null;
 }
 
 - (NSString *)sqlStringForValue:(id)_value attributeNamed:(NSString *)_attrName {
@@ -1108,7 +1109,8 @@ NSString *EOBindVariableValueKey       = @"value";
     return [bindVars objectForKey:EOBindVariablePlaceHolderKey];
   }
   
-  return [[self class] formatValue:_value?_value:null forAttribute:attribute];
+  return [[self class] formatValue:(_value ? _value : (id)null)
+                      forAttribute:attribute];
 }
 
 + (NSString *)sqlPatternFromShellPattern:(NSString *)_pattern {
index ccf08d9b10578d9ca5785f9e8ea89c9c5bcdbb3f..173e8cf965346144744b3730b2d7e426a2dc3264 100644 (file)
@@ -96,7 +96,7 @@ static EONull *null          = nil;
     if ([source isEqual:null] || (source == nil))
       checkNull = YES;
     
-    formattedLeft = [adaptor formatValue:source?source:null
+    formattedLeft = [adaptor formatValue:(source ? source : (id)null)
                              forAttribute:destination];
   }
 
@@ -114,7 +114,7 @@ static EONull *null          = nil;
     if ([destination isEqual:null] || (destination == nil))
       checkNull = YES;
     
-    formattedRight = [adaptor formatValue:destination?destination:null
+    formattedRight = [adaptor formatValue:(destination ? destination :(id)null)
                               forAttribute:source];
   }
 
@@ -184,7 +184,8 @@ static EONull *null          = nil;
     /* return nil when is unable to build a complete qualifier
        for all primary key attributes
     */
-  return pkey ? [self qualifierForRow:pkey entity:_entity] : nil;
+  return pkey != nil
+    ? [self qualifierForRow:pkey entity:_entity] : (EOSQLQualifier *)nil;
 }
 
 + (EOSQLQualifier*)qualifierForRow:(NSDictionary*)row 
@@ -564,7 +565,7 @@ handle_attribute(EOSQLQualifier *self, id object, id _relationshipPaths)
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:\n", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:\n", self, NSStringFromClass([self class])];
 
   [ms appendFormat:@" entity=%@", [self->entity name]];
   
index f6340db36d7a819fe4bf1231382ca92cf273bf15..36942df696fd5db893a9b25dae1fa2e08e90ed2c 100644 (file)
 
 @end
 
+
 @implementation EOSelectSQLExpression
 
 - (NSString *)expressionValueForAttribute:(EOAttribute *)attribute
   context:(id)context
 {
-  NSString *alias;
-  NSString *columnName;
+    NSString *alias;
+    NSString *columnName;
   
-  alias = [entitiesAndPropertiesAliases objectForKey:context];
+    alias = [entitiesAndPropertiesAliases objectForKey:context];
   
-  //NSLog(@"entitiesAndPropertiesAliases: %@", entitiesAndPropertiesAliases);
+    //NSLog(@"entitiesAndPropertiesAliases: %@", entitiesAndPropertiesAliases);
   
     columnName = adaptor
-      ? [adaptor formatAttribute:attribute]
+      ? (NSString *)[adaptor formatAttribute:attribute]
       : [attribute columnName];
 
     if (alias) {
@@ -76,6 +77,7 @@
 
 @end /* EOSelectSQLExpression */
 
+
 @implementation EOSelectScannerHandler
 
 - (id)init {
   NSString *columnName;
 
   columnName = (adaptor)
-    ? [adaptor formatAttribute:self->attribute]
+    ? (NSString *)[adaptor formatAttribute:self->attribute]
     : [self->attribute columnName];
 
   if (alias)
index b8b6232ba44f38e2f3b2fe6d07f1c9c82ead1a34..a01419009b77b120de430c6ce9971f819ca46e1f 100644 (file)
@@ -46,7 +46,11 @@ ADDITIONAL_LIB_DIRS += \
        $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
 endif
 
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += -L/usr/local/lib64 -L/usr/lib64
+else
 SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
+endif
 
 
 # TODO: add prebinding address
index 1e1b1b4fc4a61239d7b40fff10fac21af915cc33..0d71e7663cdd42daf5b48bcffc44392a12b595b6 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=55
+SUBMINOR_VERSION:=56
index 9b14b4c14583857ff258f0136c506284b5d726af..fde4ac11e80439bf34c46e1452469d1b4ca1b660 100644 (file)
@@ -5,9 +5,14 @@
 ifneq ($(FHS_INSTALL_ROOT),)
 
 FHS_INCLUDE_DIR=$(FHS_INSTALL_ROOT)/include/
-FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/
 FHS_BIN_DIR=$(FHS_INSTALL_ROOT)/bin/
 
+ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64)
+SYSTEM_LIB_DIR += -L/usr/local/lib64
+else
+SYSTEM_LIB_DIR += -L/usr/local/lib
+endif
+
 NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/"
 NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)"
 NONFHS_BINDIR="$(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)"
index e9a2e3cf117340fe1818908866e61dfc72383632..29bf3ed5403a2e4cad24171ca5f91b3e676d5018 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.36)
+
 2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
 
        * GNUmakefile, GNUmakefile.preamble: added OSX framework compilation
index 1bfdee2553d406347ed7b7711ab0a3c42a302612..773387caa7475219b1fec1d268e0949af246c27f 100644 (file)
@@ -422,7 +422,7 @@ static NSTimeInterval ChannelCollectionTimer = 5 * 60;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
   [ms appendFormat:@" #adaptors=%d", [self->urlToAdaptor count]];
   
@@ -499,9 +499,9 @@ static NSTimeInterval ChannelCollectionTimer = 5 * 60;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
-  [ms appendFormat:@" channel=0x%08X", self->channel];
+  [ms appendFormat:@" channel=0x%p", self->channel];
   if (self->creationTime) [ms appendFormat:@" created=%@", self->creationTime];
   if (self->lastReleaseTime) 
     [ms appendFormat:@" last-released=%@", self->lastReleaseTime];
index 8035091eb8afa08c8ab27a1df2df51ede610517b..96a8578cdeec81bfeda4b8358758c0a9e3c03133 100644 (file)
   NSMutableString *ms;
   
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   [self appendAttributesToDescription:ms];
   [ms appendString:@">"];
   return ms;
index 0c5a0e186c4d7e3784692a0791470840c71def47..b4c1647c4f461b625a12e88900b0d78b7b3bb898 100644 (file)
@@ -555,10 +555,10 @@ static GCSStringFormatter *stringFormatter = nil;
     bsql = [self _generateUpdateStatementForRow:contentRow
                 tableName:[self storeTableName]
                 whereColumn:@"c_name" isEqualTo:_name
-                andColumn:(_baseVersion != 0 ? @"c_version" : nil)
+                andColumn:(_baseVersion != 0 ? (id)@"c_version" : (id)nil)
                 isEqualTo:(_baseVersion != 0
                            ? [NSNumber numberWithUnsignedInt:_baseVersion] 
-                           : nil)];
+                           : (NSNumber *)nil)];
   }
   
   /* execute */
@@ -833,7 +833,7 @@ static GCSStringFormatter *stringFormatter = nil;
   id tmp;
   
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
 
   if (self->folderId)
     [ms appendFormat:@" id=%@", self->folderId];
index 53a56b3332ab07174eb830141f5bfa2ad0d53c17..68c9a9dcc587f812d199f2fbd54bcd871a8c1456 100644 (file)
@@ -643,10 +643,10 @@ static const char *GCSPathColumnPattern     = "c_path%i";
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   
   [ms appendFormat:@" url=%@", [self->folderInfoLocation absoluteString]];
-  [ms appendFormat:@" channel-manager=0x%08X", [self channelManager]];
+  [ms appendFormat:@" channel-manager=0x%p", [self channelManager]];
   
   [ms appendString:@">"];
   return ms;
index e59e389dc967182425475b875893059e3025e358..76f2d36bb3ca410e17e1e31bb125f739cc6c96bd 100644 (file)
 - (GCSFieldExtractor *)quickExtractor {
   Class clazz;
   
-  if (self->extractor)
-    return [self->extractor isNotNull] ? self->extractor : nil;
+  if (self->extractor != nil) {
+    return [self->extractor isNotNull]
+      ? self->extractor : (GCSFieldExtractor *)nil;
+  }
 
   clazz = self->extractorClassName
     ? NSClassFromString(self->extractorClassName)
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:256];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
 
   [ms appendFormat:@" blobtable='%@'",  self->blobTablePattern];
   [ms appendFormat:@" quicktable='%@'", self->quickTablePattern];
index 7db0d139c8c3201dbfc42e30d00ec6f8b421b5e2..f9f8f165f27c7568079cc6e78a23fe25f3d140e6 100644 (file)
@@ -2,7 +2,7 @@
 
 MAJOR_VERSION:=4
 MINOR_VERSION:=5
-SUBMINOR_VERSION:=35
+SUBMINOR_VERSION:=36
 
 # v4.5.29 requires libNGExtensions v4.5.161
 # v4.5.26 does not require libNGiCal anymore
index a88466e04c1a3bcc7104df8892c38f344c18cfdf..3bca67214ab3dc00ff1fc34f20e048f1def75a27 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.13)
+
 2005-07-29  Helge Hess  <helge.hess@skyrix.com>
 
        * v4.5.12
index 89fd9930edf5b66dc11b31134c2839e65b2462a8..1d40a1201e03a6350b2981af6ef5f63639aeda9f 100644 (file)
@@ -181,7 +181,7 @@ static int openConnectionCount = 0;
   }
   
   if (isDebuggingEnabled)
-    NSLog(@"MySQL4 connection established 0x%08X", self->_connection);
+    NSLog(@"MySQL4 connection established 0x%p", self->_connection);
 
 #if 0
   NSLog(@"---------- %s: %@ opens channel count[%d]", __PRETTY_FUNCTION__,
@@ -196,7 +196,7 @@ static int openConnectionCount = 0;
 #endif
 
   if (isDebuggingEnabled) {
-    NSLog(@"MySQL4 channel 0x%08X opened (connection=0x%08X,%s)",
+    NSLog(@"MySQL4 channel 0x%p opened (connection=0x%p,%s)",
           (unsigned)self, self->_connection, cDBName);
   }
   return YES;
@@ -216,8 +216,8 @@ static int openConnectionCount = 0;
     
     if (isDebuggingEnabled) {
       fprintf(stderr, 
-             "MySQL4 connection dropped 0x%08X (channel=0x%08X)\n",
-              (unsigned)self->_connection, (unsigned)self);
+             "MySQL4 connection dropped 0x%p (channel=0x%p)\n",
+              self->_connection, self);
     }
     self->_connection = NULL;
   }
@@ -679,7 +679,7 @@ static int openConnectionCount = 0;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:64];
-  [ms appendFormat:@"<%@[0x%08X] connection=0x%08X",
+  [ms appendFormat:@"<%@[0x%p] connection=0x%p",
                      NSStringFromClass([self class]),
                      self,
                      (unsigned)self->_connection];
index 6efd34805da35d76b5d155cf6dec6c046ae33dc2..608b79b77d3868af084e2d7bf4276f3f9a43aa42 100644 (file)
@@ -82,7 +82,7 @@
       return nil;
     }
     NSLog(@"WARNING(%s): %@ falling back to NSString for MySQL4 value"
-          @" (type %i, 0x%08X, len=%d)",
+          @" (type %i, 0x%p, len=%d)",
           __PRETTY_FUNCTION__, NSStringFromClass([self class]),
           _type, _v, _len);
     
index cda34ac9d72a5b695708435677454b874f6e337d..76aa6eb9f8fdde55c758b926567fd4e7d30b1f3b 100644 (file)
@@ -1,3 +1,3 @@
 # Version file
 
-SUBMINOR_VERSION:=12
+SUBMINOR_VERSION:=13
index 3b60179330a66e22e02426cbef6f839112172058..bc4936954a4551c0bba1aa235e1c146444f45a4d 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.46)
+
 2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
 
        * GNUmakefile.preamble: added OSX framework compilation (v4.5.45)
index 78ac0a93d80cf27ed268569fbb24526bfeec3d96..97367995a44f8bb58ad41cfef5a44fa1c5eb8a82 100644 (file)
@@ -207,9 +207,9 @@ static BOOL debugOn = NO;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]: ", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]: ", self, NSStringFromClass([self class])];
   if ([self isValid])
-    [ms appendFormat:@" connection=0x%08X", self->_connection];
+    [ms appendFormat:@" connection=0x%p", self->_connection];
   else
     [ms appendString:@" not-connected"];
   [ms appendString:@">"];
index f9aa4ecccc31e7e9a7f7cab984c9073d5ec57578..4ea1fc3cee398435083cc609ed9234db80680619 100644 (file)
@@ -226,7 +226,7 @@ static int openConnectionCount = 0;
   openConnectionCount++;
 
   if (isDebuggingEnabled) {
-    NSLog(@"PostgreSQL72 channel 0x%08X opened (connection=%@)",
+    NSLog(@"PostgreSQL72 channel 0x%p opened (connection=%@)",
           (unsigned)self, self->connection);
   }
   return YES;
@@ -257,8 +257,8 @@ static int openConnectionCount = 0;
     
     if (isDebuggingEnabled) {
       fprintf(stderr, 
-             "PostgreSQL72 connection dropped 0x%08X (channel=0x%08X)\n",
-              (unsigned)self->connection, (unsigned)self);
+             "PostgreSQL72 connection dropped 0x%p (channel=0x%p)\n",
+              self->connection, self);
     }
     [self->connection release];
     self->connection = nil;
@@ -641,7 +641,7 @@ static int openConnectionCount = 0;
   }
 
   if (isDebuggingEnabled)
-    NSLog(@"PG0x%08X SQL: %@", (unsigned)self, _expression);
+    NSLog(@"PG0x%p SQL: %@", (unsigned)self, _expression);
   
   [self _resetEvaluationState];
   
@@ -710,7 +710,7 @@ static int openConnectionCount = 0;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
   if (self->connection)
     [ms appendFormat:@" connection=%@", self->connection];
   else
@@ -737,7 +737,7 @@ static int openConnectionCount = 0;
 
   seq = [seqName length] > 0
     ? [StringClass stringWithFormat:@"SELECT NEXTVAL ('%@')", seqName]
-    : [adaptor newKeyExpression];
+    : (id)[adaptor newKeyExpression];
   
   // TODO: since we use evaluateExpressionX, we should not see exceptions?
   NS_DURING {
index aab40918d8df400dd26555f46dd890a58a345e8e..324bcc303bb67bd062cccda921ba68a6dad080b9 100644 (file)
@@ -1,5 +1,5 @@
 # version file
 
-SUBMINOR_VERSION:=45
+SUBMINOR_VERSION:=46
 
 # v4.5.41 requires libGDLAccess v4.5.50
index 72e80775ecb7cb2d8810013286163981b4746dbb..7bc845651709bae3ae09ee60ab4fa2b8ec061992 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.21)
+
 2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
 
        * GNUmakefile.preamble: added OSX framework compilation (v4.5.20)
index 92b0e9972abd82d6b99b2ec025a42a8e53e35638..acc1e472a1196cb7be702ad7f9dbb0c11743634e 100644 (file)
@@ -148,7 +148,7 @@ static int openConnectionCount = 0;
   }
   
   if (isDebuggingEnabled)
-    NSLog(@"SQLite connection established 0x%08X", self->_connection);
+    NSLog(@"SQLite connection established 0x%p", self->_connection);
 
 #if 0
   NSLog(@"---------- %s: %@ opens channel count[%d]", __PRETTY_FUNCTION__,
@@ -163,7 +163,7 @@ static int openConnectionCount = 0;
 #endif
 
   if (isDebuggingEnabled) {
-    NSLog(@"SQLite channel 0x%08X opened (connection=0x%08X,%s)",
+    NSLog(@"SQLite channel 0x%p opened (connection=0x%p,%s)",
           (unsigned)self, self->_connection, cDBName);
   }
   return YES;
@@ -185,8 +185,8 @@ static int openConnectionCount = 0;
     
     if (isDebuggingEnabled) {
       fprintf(stderr, 
-             "SQLite connection dropped 0x%08X (channel=0x%08X)\n",
-              (unsigned)self->_connection, (unsigned)self);
+             "SQLite connection dropped 0x%p (channel=0x%p)\n",
+              self->_connection, self);
     }
     self->_connection = NULL;
   }
@@ -617,7 +617,7 @@ static int openConnectionCount = 0;
   NSMutableString *ms;
 
   ms = [NSMutableString stringWithCapacity:64];
-  [ms appendFormat:@"<%@[0x%08X] connection=0x%08X",
+  [ms appendFormat:@"<%@[0x%p] connection=0x%p",
                      NSStringFromClass([self class]),
                      self,
                      (unsigned)self->_connection];
@@ -643,7 +643,7 @@ static int openConnectionCount = 0;
   
   seq = ([seqName length] > 0)
     ? [NSString stringWithFormat:@"SELECT NEXTVAL ('%@')", seqName]
-    : [adaptor newKeyExpression];
+    : (id)[adaptor newKeyExpression];
   
   NS_DURING {
     if ([self evaluateExpression:seq]) {
index 26ee2eeb7fec481ef6513bc2ca68dce0cd9b4e50..6374136ae1857c1a82ffcfc574f5148292618ec1 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-SUBMINOR_VERSION:=20
+SUBMINOR_VERSION:=21
 
 # v4.5.17 requires libGDLAccess v4.5.50