From 0fa8f3a4bc5c0a0034958c7e7893e50049a2db8f Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 3 Jul 2006 20:12:48 +0000 Subject: [PATCH] use %p for pointer formats, fixed gcc 4.1 warnings, minor code improvs git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1287 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- .../NGObjWeb/Associations/WOAssociation.m | 2 +- .../Associations/WOKeyPathAssociation.m | 10 +++++----- .../Associations/WOLabelAssociation.m | 2 +- .../Associations/WOResourceURLAssociation.m | 4 ++-- .../Associations/WOScriptAssociation.m | 2 +- .../Associations/WOValueAssociation.m | 4 ++-- sope-appserver/NGObjWeb/ChangeLog | 5 +++++ .../NGObjWeb/DynamicElements/WOActionURL.m | 12 ++++++------ .../NGObjWeb/DynamicElements/WOBrowser.m | 2 +- .../NGObjWeb/DynamicElements/WOCheckBox.m | 3 ++- .../DynamicElements/WOComponentReference.m | 4 ++-- .../DynamicElements/WOCompoundElement.m | 12 ++++-------- .../NGObjWeb/DynamicElements/WOConditional.m | 15 ++++++++------- .../DynamicElements/WOEmbeddedObject.m | 3 ++- .../NGObjWeb/DynamicElements/WOForm.m | 6 +++--- .../NGObjWeb/DynamicElements/WOFrame.m | 2 +- .../DynamicElements/WOGenericElement.m | 2 +- .../DynamicElements/WOHTMLDynamicElement.m | 2 +- .../NGObjWeb/DynamicElements/WOIFrame.m | 4 ++-- .../NGObjWeb/DynamicElements/WOImage.m | 12 +++++------- .../NGObjWeb/DynamicElements/WOImageButton.m | 2 +- .../NGObjWeb/DynamicElements/WOMetaRefresh.m | 4 ++-- .../NGObjWeb/DynamicElements/WOPopUpButton.m | 6 +++--- .../NGObjWeb/DynamicElements/WORepetition.m | 4 ++-- .../NGObjWeb/DynamicElements/WOResourceURL.m | 3 ++- .../NGObjWeb/DynamicElements/WOSetHeader.m | 4 ++-- .../NGObjWeb/DynamicElements/WOString.m | 9 ++++----- .../NGObjWeb/DynamicElements/WOSubmitButton.m | 2 +- .../_WOCommonStaticDAHyperlink.m | 4 ++-- .../DynamicElements/_WOComplexHyperlink.m | 12 ++++++------ .../DynamicElements/_WOResourceImage.m | 2 +- .../DynamicElements/_WOTemporaryHyperlink.m | 6 ++---- sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.m | 2 +- .../NGObjWeb/NGHttp/NGHttpHeaderFields.m | 18 +++++++++--------- sope-appserver/NGObjWeb/OWResourceManager.m | 4 ++-- .../NGObjWeb/SoObjects/SoActionInvocation.m | 4 ++-- sope-appserver/NGObjWeb/SoObjects/SoClass.m | 10 ++++++---- .../NGObjWeb/SoObjects/SoClassSecurityInfo.m | 10 +++++----- .../NGObjWeb/SoObjects/SoObjCClass.m | 4 ++-- sope-appserver/NGObjWeb/SoObjects/SoObject.m | 7 ++++--- .../SoObjects/SoObjectMethodDispatcher.m | 4 ++-- .../SoObjects/SoObjectRequestHandler.m | 12 ++++++------ .../NGObjWeb/SoObjects/SoPageInvocation.m | 2 +- sope-appserver/NGObjWeb/SoObjects/SoProduct.m | 4 ++-- .../NGObjWeb/SoObjects/SoProductClassInfo.m | 2 +- .../NGObjWeb/SoObjects/SoProductRegistry.m | 2 +- .../SoObjects/SoProductResourceManager.m | 6 +++--- .../NGObjWeb/SoObjects/SoSecurityManager.m | 6 +++--- .../NGObjWeb/SoObjects/SoSelectorInvocation.m | 4 ++-- .../NGObjWeb/SoObjects/SoSubContext.m | 2 +- .../NGObjWeb/SoObjects/SoTemplateRenderer.m | 2 +- sope-appserver/NGObjWeb/SoObjects/SoUser.m | 2 +- .../NGObjWeb/SoObjects/WOContext+SoObjects.m | 3 ++- .../SoObjects/WODirectAction+SoObjects.m | 6 ++++-- .../WODirectActionRequestHandler+SoObjects.m | 4 ++-- .../NGObjWeb/Templates/WOComponentScript.m | 2 +- .../Templates/WOComponentScriptPart.m | 2 +- sope-appserver/NGObjWeb/Templates/WODParser.m | 2 +- .../NGObjWeb/Templates/WOHTMLParser.m | 2 +- .../NGObjWeb/Templates/WOTemplate.m | 2 +- .../Templates/WOWrapperTemplateBuilder.m | 5 +++-- sope-appserver/NGObjWeb/Version | 2 +- .../NGObjWeb/WEClientCapabilities.m | 2 +- sope-appserver/NGObjWeb/WOApplication.m | 8 ++++---- sope-appserver/NGObjWeb/WOComponent.m | 18 +++++++++--------- .../NGObjWeb/WOComponentDefinition.m | 4 ++-- sope-appserver/NGObjWeb/WOContext.m | 10 +++++----- sope-appserver/NGObjWeb/WOCookie.m | 2 +- sope-appserver/NGObjWeb/WOCoreApplication.m | 2 +- sope-appserver/NGObjWeb/WODisplayGroup.m | 19 +++++++++++++------ sope-appserver/NGObjWeb/WODynamicElement.m | 4 ++-- sope-appserver/NGObjWeb/WOElement.m | 16 ++++++++-------- sope-appserver/NGObjWeb/WOElementID.m | 2 +- sope-appserver/NGObjWeb/WOFileSessionStore.m | 2 +- sope-appserver/NGObjWeb/WOHTTPConnection.m | 9 +++++---- .../NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m | 2 +- sope-appserver/NGObjWeb/WOMessage.m | 4 ++-- sope-appserver/NGObjWeb/WORequest.m | 10 +++++----- sope-appserver/NGObjWeb/WOResourceManager.m | 6 +++--- sope-appserver/NGObjWeb/WOResponse.m | 2 +- sope-appserver/NGObjWeb/WORunLoop.m | 2 +- sope-appserver/NGObjWeb/WOScriptedComponent.m | 2 +- .../NGObjWeb/WOServerSessionStore.m | 2 +- sope-appserver/NGObjWeb/WOSession.m | 8 ++++---- .../WebDAV/EOFetchSpecification+SoDAV.m | 5 +++-- .../NGObjWeb/WebDAV/SoDAVLockManager.m | 2 +- .../NGObjWeb/WebDAV/SoObjectResultEntry.m | 8 ++++---- .../WebDAV/SoObjectWebDAVDispatcher.m | 2 +- .../NGObjWeb/WebDAV/SoWebDAVRenderer.m | 4 ++-- sope-appserver/NGObjWeb/_WOStringTable.m | 2 +- sope-appserver/NGObjWeb/fhs.make | 9 +++++++-- 91 files changed, 246 insertions(+), 225 deletions(-) diff --git a/sope-appserver/NGObjWeb/Associations/WOAssociation.m b/sope-appserver/NGObjWeb/Associations/WOAssociation.m index 7f375028..cb45d261 100644 --- a/sope-appserver/NGObjWeb/Associations/WOAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOAssociation.m @@ -239,7 +239,7 @@ static Class WOKeyPathAssociationClass = Nil; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<0x%08X[%@]>", + return [NSString stringWithFormat:@"<0x%p[%@]>", self, NSStringFromClass([self class])]; } diff --git a/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m b/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m index f7cb400c..dec66ea4 100644 --- a/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m @@ -516,7 +516,7 @@ static WOReturnValueHolder _getComponentValue(WOKeyPathAssociation *self, if (info->type == WOKeyType_method) { #if HEAVY_DEBUG [self logWithFormat:@"get key %s of keyPath %@\n" - @" from: 0x%08X[%@]\n" + @" from: 0x%p[%@]\n" @" via method (ret %c)", info->ckey, [self keyPath], object, NSStringFromClass([object class]), info->retType]; @@ -527,7 +527,7 @@ static WOReturnValueHolder _getComponentValue(WOKeyPathAssociation *self, if ((info->retType == _C_ID) || (info->retType == _C_CLASS)) { retValue.object = info->access.method(object, info->extra.sel.get); #if HEAVY_DEBUG - [self logWithFormat:@" got result 0x%08X[%@]: %@", retValue.object, + [self logWithFormat:@" got result 0x%p[%@]: %@", retValue.object, NSStringFromClass([retValue.object class]), retValue.object]; #endif @@ -680,7 +680,7 @@ static inline id _objectify(unsigned char _type, WOReturnValueHolder *_value) { break; } - // NSLog(@"made %@[0x%08X].", NSStringFromClass([result class]), result); + // NSLog(@"made %@[0x%p].", NSStringFromClass([result class]), result); return result; } @@ -1085,7 +1085,7 @@ static BOOL _setValue(WOKeyPathAssociation *self, id _value, id root) { } #if 0 - [self logWithFormat:@"ret value object for key '%s' is 0x%08X", + [self logWithFormat:@"ret value object for key '%s' is 0x%p", info->ckey, retValue.object]; [self logWithFormat:@"ret value object class is %@", [retValue.object class]]; @@ -1376,7 +1376,7 @@ static BOOL _setValue(WOKeyPathAssociation *self, id _value, id root) { } - (NSString *)description { - return [StringClass stringWithFormat:@"<%@[0x%08X]: keyPath=%@>", + return [StringClass stringWithFormat:@"<%@[0x%p]: keyPath=%@>", NSStringFromClass([self class]), self, [self keyPath]]; } diff --git a/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m b/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m index 0e19bc8e..67bc3bf4 100644 --- a/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m @@ -162,7 +162,7 @@ NSMutableString *str; str = [NSMutableString stringWithCapacity:64]; - [str appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [str appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if (self->flags.isKeyKeyPath) [str appendFormat:@" key=%@", self->key]; diff --git a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m index c2216da6..65c49888 100644 --- a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m @@ -165,7 +165,7 @@ static BOOL doDebug = NO; return doDebug; } - (NSString *)loggingPrefix { - return [NSString stringWithFormat:@"[rsrc:url assoc:0x%08X]", self]; + return [NSString stringWithFormat:@"[rsrc:url assoc:0x%p]", self]; } /* description */ @@ -174,7 +174,7 @@ static BOOL doDebug = NO; NSMutableString *str; str = [NSMutableString stringWithCapacity:64]; - [str appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self]; + [str appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; [str appendFormat:@" rsrc='%@'", [self resourceName]]; [str appendString:@">"]; return str; diff --git a/sope-appserver/NGObjWeb/Associations/WOScriptAssociation.m b/sope-appserver/NGObjWeb/Associations/WOScriptAssociation.m index e1e41282..391472ba 100644 --- a/sope-appserver/NGObjWeb/Associations/WOScriptAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOScriptAssociation.m @@ -125,7 +125,7 @@ static BOOL doDebug = NO; NSString *v; str = [NSMutableString stringWithCapacity:64]; - [str appendFormat:@"<%@[0x%08X]: script(%@)=", + [str appendFormat:@"<%@[0x%p]: script(%@)=", NSStringFromClass([self class]), self, [self language]]; v = self->script; diff --git a/sope-appserver/NGObjWeb/Associations/WOValueAssociation.m b/sope-appserver/NGObjWeb/Associations/WOValueAssociation.m index e98f99c5..d857fa4c 100644 --- a/sope-appserver/NGObjWeb/Associations/WOValueAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOValueAssociation.m @@ -157,7 +157,7 @@ static Class StrClass = Nil; NSMutableString *str; str = [NSMutableString stringWithCapacity:64]; - [str appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [str appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; [str appendString:@" value="]; if ([self->value isKindOfClass:StrClass]) { NSString *v = self->value; @@ -260,7 +260,7 @@ static NSNumber *noNum = nil; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: %s", + return [NSString stringWithFormat:@"<%@[0x%p]: %s", NSStringFromClass([self class]), self, self->value ? "YES" : "NO"]; } diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 972c595c..c8be22a4 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2006-07-03 Helge Hess + + * use %p for pointer formats, fixed gcc 4.1 warnings, use + -warnWithFormat: when appropriate (v4.5.239) + 2006-06-22 Helge Hess * DAVPropMap.plist: added three more WebDrive properties, diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOActionURL.m b/sope-appserver/NGObjWeb/DynamicElements/WOActionURL.m index d95f69f1..bc766ad4 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOActionURL.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOActionURL.m @@ -163,7 +163,7 @@ - (id)invokeActionForRequest:(WORequest *)_request inContext:(WOContext *)_ctx { - [[_ctx session] logWithFormat:@"%@[0x%08X]: no action/page set !", + [[_ctx session] logWithFormat:@"%@[0x%p]: no action/page set !", NSStringFromClass([self class]), self]; return nil; } @@ -332,7 +332,7 @@ if (page == nil) { [[_ctx session] logWithFormat: - @"%@[0x%08X]: did not find page with name %@ !", + @"%@[0x%p]: did not find page with name %@ !", NSStringFromClass([self class]), self, name]; } return page; @@ -433,13 +433,13 @@ NSString *key; keys = [self->queryParameters keyEnumerator]; - while ((key = [keys nextObject])) { + while ((key = [keys nextObject]) != nil) { id assoc, value; assoc = [self->queryParameters objectForKey:key]; value = [assoc stringValueInComponent:sComponent]; - [qd setObject:(value ? value : @"") forKey:key]; + [qd setObject:(value != nil ? value : (id)@"") forKey:key]; } } @@ -469,9 +469,9 @@ - (NSString *)associationDescription { NSMutableString *str = [NSMutableString stringWithCapacity:256]; - if (self->actionClass) + if (self->actionClass != nil) [str appendFormat:@" actionClass=%@", self->actionClass]; - if (self->directActionName) + if (self->directActionName != nil) [str appendFormat:@" directAction=%@", self->directActionName]; [str appendString:[super associationDescription]]; diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m b/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m index 9af481f8..711bf9d2 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m @@ -311,7 +311,7 @@ v = (self->value != nil) ? [self->value stringValueInComponent:sComponent] - : [NSString stringWithFormat:@"%i", i]; // TODO: slow + : (NSString *)[NSString stringWithFormat:@"%i", i]; // TODO: slow displayV = self->string ? [self->string stringValueInComponent:sComponent] diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOCheckBox.m b/sope-appserver/NGObjWeb/DynamicElements/WOCheckBox.m index 72c6d131..8fc69596 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOCheckBox.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOCheckBox.m @@ -93,7 +93,8 @@ [_response appendContentHTMLAttributeValue: OWFormElementName(self, _ctx)]; WOResponse_AddCString(_response, "\" value=\""); - [_response appendContentHTMLAttributeValue:([v length] > 0) ? v : @"1"]; + [_response appendContentHTMLAttributeValue: + ([v isNotEmpty] ? v : (NSString *)@"1")]; WOResponse_AddCString(_response, "\""); if ([self->disabled boolValueInComponent:[_ctx component]]) { diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m b/sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m index 0c9e969e..cdac56a7 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m @@ -202,10 +202,10 @@ _updateComponent(WOComponentReference *self, WOContext *_ctx) NSMutableString *desc; desc = [NSMutableString stringWithCapacity:64]; - [desc appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self]; + [desc appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; if (self->child != nil) { - [desc appendFormat:@" child=%@[0x%08X] childName=%@", + [desc appendFormat:@" child=%@[0x%p] childName=%@", NSStringFromClass([self->child class]), self->child, [self->child name]]; } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m b/sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m index 6790c2dc..aa7b92e2 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m @@ -261,10 +261,8 @@ static int descriptiveIDs = -1; for (j = [_ctx componentStackCount] + depth; j >= 0; j--) printf(" "); #endif - printf(" Child of 0x%08X: i[%i] %s <%s>: %0.3fs\n", - (unsigned int)self, - i, [[_ctx elementID] cString], - [child class]->name, + printf(" Child of 0x%p: i[%i] %s <%s>: %0.3fs\n", + self, i, [[_ctx elementID] cString], [child class]->name, diff); } } @@ -294,10 +292,8 @@ static int descriptiveIDs = -1; for (i = [_ctx componentStackCount] + depth; i >= 0; i--) printf(" "); #endif - printf("CompoundElem0x%08X(#%i) %s (component=%s): %0.3fs\n", - (unsigned int)self, - self->count, - [[_ctx elementID] cString], + printf("CompoundElem0x%p(#%i) %s (component=%s): %0.3fs\n", + self, self->count, [[_ctx elementID] cString], [[(WOComponent *)[_ctx component] name] cString], diff); } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOConditional.m b/sope-appserver/NGObjWeb/DynamicElements/WOConditional.m index 494ea9c0..e3fb1f03 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOConditional.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOConditional.m @@ -63,7 +63,7 @@ static int descriptiveIDs = -1; template:(WOElement *)_c { #if DEBUG - self->condName = _name ? [_name copy] : @"condYES"; + self->condName = _name ? [_name copy] : (id)@"condYES"; #endif if ((self = [super initWithName:_name associations:_config template:_c])) { @@ -73,9 +73,8 @@ static int descriptiveIDs = -1; self->template = [_c retain]; if (self->condition == nil) { - [self logWithFormat: - @"WARNING: missing 'condition' association in element: '%@'", - _name]; + [self warnWithFormat: + @"missing 'condition' association in element: '%@'", _name]; } } return self; @@ -191,7 +190,8 @@ static inline BOOL _doShow(WOConditional *self, WOContext *_ctx) { } #if DEBUG - [_ctx appendElementIDComponent:descriptiveIDs ? self->condName : @"1"]; + [_ctx appendElementIDComponent: + descriptiveIDs ? self->condName : (NSString *)@"1"]; #else [_ctx appendElementIDComponent:@"1"]; #endif @@ -212,7 +212,7 @@ static inline BOOL _doShow(WOConditional *self, WOContext *_ctx) { [_ctx consumeElementID]; // consume state-id (on or off) #if DEBUG - key = descriptiveIDs ? self->condName : @"1"; + key = descriptiveIDs ? self->condName : (NSString *)@"1"; #else key = @"1"; #endif @@ -232,7 +232,8 @@ static inline BOOL _doShow(WOConditional *self, WOContext *_ctx) { if (!_doShow(self, _ctx)) return; #if DEBUG - [_ctx appendElementIDComponent:descriptiveIDs ? self->condName : @"1"]; + [_ctx appendElementIDComponent: + descriptiveIDs ? self->condName : (NSString *)@"1"]; #else [_ctx appendElementIDComponent:@"1"]; #endif diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOEmbeddedObject.m b/sope-appserver/NGObjWeb/DynamicElements/WOEmbeddedObject.m index 26e6f035..7edefac1 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOEmbeddedObject.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOEmbeddedObject.m @@ -106,7 +106,8 @@ response = [_ctx response]; [response setContent:adata]; - [response setHeader:atype ? atype : @"application/octet-stream" + [response setHeader: + (atype != nil ? atype :(NSString *)@"application/octet-stream") forKey:@"content-type"]; return response; diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOForm.m b/sope-appserver/NGObjWeb/DynamicElements/WOForm.m index 29f74015..c792924b 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOForm.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOForm.m @@ -224,7 +224,7 @@ static int debugTakeValues = -1; if (page == nil) { [[_ctx session] logWithFormat: - @"%@[0x%08X]: did not find page with name %@ !", + @"%@[0x%p]: did not find page with name %@ !", NSStringFromClass([self class]), self, pname]; } NSLog(@"showing page %@", page); @@ -312,8 +312,8 @@ static int debugTakeValues = -1; assoc = [self->queryParameters objectForKey:key]; value = [assoc stringValueInComponent:sComponent]; - - [qd setObject:(value ? value : @"") forKey:key]; + + [qd setObject:(value != nil ? value : (id)@"") forKey:key]; } } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOFrame.m b/sope-appserver/NGObjWeb/DynamicElements/WOFrame.m index 5cc90d0e..1aae347e 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOFrame.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOFrame.m @@ -391,7 +391,7 @@ assoc = [self->queryParameters objectForKey:key]; value = [assoc stringValueInComponent:sComponent]; - [qd setObject:(value ? value : @"") forKey:key]; + [qd setObject:(value != nil ? value : (id)@"") forKey:key]; } } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m b/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m index e10d10b2..9c756760 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m @@ -73,7 +73,7 @@ typedef struct { children = [_element hasChildNodes] ? [_builder buildNodes:[_element childNodes] templateBuilder:_builder] - : nil; + : (NSArray *)nil; /* construct self ... */ self = [(WODynamicElement *)self initWithName:name diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOHTMLDynamicElement.m b/sope-appserver/NGObjWeb/DynamicElements/WOHTMLDynamicElement.m index ae8c0e72..32c0f8e5 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOHTMLDynamicElement.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOHTMLDynamicElement.m @@ -95,7 +95,7 @@ static BOOL debugActionExecute = NO; return [object performSelector:act]; [[_ctx component] logWithFormat: - @"%@[0x%08X]: %@ does not respond to action @%@", + @"%@[0x%p]: %@ does not respond to action @%@", NSStringFromClass([self class]), self, object, NSStringFromSelector(act)]; diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOIFrame.m b/sope-appserver/NGObjWeb/DynamicElements/WOIFrame.m index 4fe8168c..98632ba6 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOIFrame.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOIFrame.m @@ -383,7 +383,7 @@ /* add ?style parameters */ - if (self->queryParameters) { + if (self->queryParameters != nil) { NSEnumerator *keys; NSString *key; @@ -394,7 +394,7 @@ assoc = [self->queryParameters objectForKey:key]; value = [assoc stringValueInComponent:sComponent]; - [qd setObject:(value ? value : @"") forKey:key]; + [qd setObject:(value != nil ? value : (id)@"") forKey:key]; } } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOImage.m b/sope-appserver/NGObjWeb/DynamicElements/WOImage.m index cc18cf76..e51a99a6 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOImage.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOImage.m @@ -74,7 +74,7 @@ return (self == WOImageClass) ? (id)temporaryImage - : NSAllocateObject(self, 0, zone); + : (id)NSAllocateObject(self, 0, zone); } /* request handling */ @@ -170,7 +170,8 @@ response = [_ctx response]; [response setContent:adata]; - [response setHeader:atype ? atype : @"application/octet-stream" + [response setHeader: + (atype != nil ? atype : (NSString *)@"application/octet-stream") forKey:@"content-type"]; return response; @@ -394,11 +395,8 @@ #endif return; -#if __APPLE__ - // TODO: same issue with gcc 4.1 on Linux ... - // make Tiger GCC happy - [super dealloc]; -#endif + // same issue with gcc 4.1 on Linux ..., make Tiger GCC happy + if (0) [super dealloc]; } @end /* _WOTemporaryImage */ diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOImageButton.m b/sope-appserver/NGObjWeb/DynamicElements/WOImageButton.m index 839ece94..d9a90619 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOImageButton.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOImageButton.m @@ -170,7 +170,7 @@ if (page == nil) { [[_ctx session] logWithFormat: - @"%@[0x%08X]: did not find page with name %@ !", + @"%@[0x%p]: did not find page with name %@ !", NSStringFromClass([self class]), self, pname]; } NSLog(@"%@: showing page %@", self, page); diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m b/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m index 206de0d6..8c64ed98 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOMetaRefresh.m @@ -129,7 +129,7 @@ if (page == nil) { [[_ctx component] logWithFormat: - @"%@[0x%08X]: did not find page with name %@ !", + @"%@[0x%p]: did not find page with name %@ !", NSStringFromClass([self class]), self, name]; } [self debugWithFormat:@"showing page %@", page]; @@ -137,7 +137,7 @@ } [[_ctx component] - logWithFormat:@"%@[0x%08X]: no action/page set !", + logWithFormat:@"%@[0x%p]: no action/page set !", NSStringFromClass([self class]), self]; return nil; } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m b/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m index 3c9127f7..9e013d02 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m @@ -354,9 +354,9 @@ static BOOL debugPopUp = NO; [self->item setValue:object inComponent:sComponent]; isSelected = sel ? [sel isEqual:object] : NO; - v = self->value + v = (self->value != nil) ? [self->value stringValueInComponent:sComponent] - : [NSString stringWithFormat:@"%i", i]; + : (NSString *)[NSString stringWithFormat:@"%i", i]; if (byVal){ isSelected = sel ? [sel isEqual:v] : NO; @@ -372,7 +372,7 @@ static BOOL debugPopUp = NO; group = self->itemGroup != nil ? [self->itemGroup stringValueInComponent:sComponent] - : nil; + : (NSString *)nil; if (group != nil) { BOOL groupChanged = NO; diff --git a/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m b/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m index 5e06bb73..561668b4 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m @@ -165,7 +165,7 @@ static inline Class _classForConfig(NSDictionary *_config) { return (self == WORepetitionClass) ? (id)temporaryRepetition - : NSAllocateObject(self, 0, zone); + : (id)NSAllocateObject(self, 0, zone); } - (id)initWithName:(NSString *)_name @@ -179,7 +179,7 @@ static inline Class _classForConfig(NSDictionary *_config) { } #if DEBUG - self->repName = _name ? [_name copy] : @"R"; + self->repName = _name ? [_name copy] : (id)@"R"; #endif if ((self = [super initWithName:_name associations:_config template:_c])) { diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOResourceURL.m b/sope-appserver/NGObjWeb/DynamicElements/WOResourceURL.m index 5b370e0b..a5ec17b0 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOResourceURL.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOResourceURL.m @@ -95,7 +95,8 @@ response = [_ctx response]; [response setContent:adata]; - [response setHeader:atype ? atype : @"application/octet-stream" + [response setHeader: + (atype != nil ? atype : (NSString *)@"application/octet-stream") forKey:@"content-type"]; return response; diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOSetHeader.m b/sope-appserver/NGObjWeb/DynamicElements/WOSetHeader.m index bf58be5c..b92b1efc 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOSetHeader.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOSetHeader.m @@ -113,7 +113,7 @@ lObject = (self->object != nil) ? [self->object valueInContext:_ctx] - : [_ctx response]; + : (id)[_ctx response]; if ([lObject isKindOfClass:[NSString class]]) lObject = [self objectForKey:(NSString *)lObject inContext:_ctx]; @@ -124,7 +124,7 @@ [lObject appendHeader:v forKey:k]; } else - [lObject setHeader:([v isNotNull] ? v : nil) forKey:k]; + [lObject setHeader:([v isNotNull] ? v : (NSString *)nil) forKey:k]; } @end /* WOSetHeader */ diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOString.m b/sope-appserver/NGObjWeb/DynamicElements/WOString.m index dc59cf93..8df7a2ed 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOString.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOString.m @@ -108,11 +108,12 @@ return (self == WOStringClass) ? (id)temporaryString - : NSAllocateObject(self, 0, zone); + : (id)NSAllocateObject(self, 0, zone); } @end /* WOString */ + @implementation _WOSimpleDynamicString - (id)initWithName:(NSString *)_name @@ -782,10 +783,8 @@ static inline Class _classForConfig(NSDictionary *_config) { #endif return; -#if __APPLE__ - // make Tiger GCC happy - [super dealloc]; -#endif + /* make Tiger GCC / gcc 4.1 happy */ + if (0) [super dealloc]; } @end /* _WOTemporaryString */ diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOSubmitButton.m b/sope-appserver/NGObjWeb/DynamicElements/WOSubmitButton.m index fe06a937..94481f9e 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOSubmitButton.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOSubmitButton.m @@ -148,7 +148,7 @@ static BOOL WOSubmitButtonEnableValueSync = NO; if (page == nil) { [[_ctx session] logWithFormat: - @"%@[0x%08X]: did not find page with name %@ !", + @"%@[0x%p]: did not find page with name %@ !", NSStringFromClass([self class]), self, pname]; } [self logWithFormat:@"showing page %@", page]; diff --git a/sope-appserver/NGObjWeb/DynamicElements/_WOCommonStaticDAHyperlink.m b/sope-appserver/NGObjWeb/DynamicElements/_WOCommonStaticDAHyperlink.m index 5787a7e0..e3ffa2dd 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/_WOCommonStaticDAHyperlink.m +++ b/sope-appserver/NGObjWeb/DynamicElements/_WOCommonStaticDAHyperlink.m @@ -95,7 +95,7 @@ WOResponse_AddCString(_response, "queryParameters) { + if (self->queryParameters != nil) { NSEnumerator *keys; NSString *key; @@ -108,7 +108,7 @@ assoc = [self->queryParameters objectForKey:key]; value = [assoc stringValueInComponent:sComponent]; - [qd setObject:(value ? value : @"") forKey:key]; + [qd setObject:(value != nil ? value : (NSString *)@"") forKey:key]; } } else diff --git a/sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m b/sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m index 31d02d4d..4fac7949 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m +++ b/sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m @@ -190,7 +190,7 @@ static Class NSURLClass = Nil; return [self->template invokeActionForRequest:_rq inContext:_ctx]; /* link is active */ - [[_ctx session] logWithFormat:@"%@[0x%08X]: no action/page set !", + [[_ctx session] logWithFormat:@"%@[0x%p]: no action/page set !", NSStringFromClass([self class]), self]; return nil; } @@ -411,10 +411,10 @@ static BOOL debugStaticLinks = NO; /* avoid creating a new URL for ".", just return the base */ url = [s isEqualToString:@"."] ? base - : [NSURLClass URLWithString:s relativeToURL:base]; + : (NSURL *)[NSURLClass URLWithString:s relativeToURL:base]; } else { - [self logWithFormat:@"WARNING: missing base URL in context ..."]; + [self warnWithFormat:@"missing base URL in context ..."]; WOResponse_AddString(_r, s); return YES; } @@ -556,7 +556,7 @@ static BOOL debugStaticLinks = NO; if (page == nil) { [[_ctx session] logWithFormat: - @"%@[0x%08X]: did not find page with name %@ !", + @"%@[0x%p]: did not find page with name %@ !", NSStringFromClass([self class]), self, name]; } return page; @@ -657,7 +657,7 @@ static BOOL debugStaticLinks = NO; /* add ?style parameters */ - if (self->queryParameters) { + if (self->queryParameters != nil) { NSEnumerator *keys; NSString *key; @@ -668,7 +668,7 @@ static BOOL debugStaticLinks = NO; assoc = [self->queryParameters objectForKey:key]; value = [assoc stringValueInComponent:sComponent]; - [qd setObject:(value ? value : @"") forKey:key]; + [qd setObject:(value != nil ? value : (id)@"") forKey:key]; } } diff --git a/sope-appserver/NGObjWeb/DynamicElements/_WOResourceImage.m b/sope-appserver/NGObjWeb/DynamicElements/_WOResourceImage.m index 3ac12929..42f52733 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/_WOResourceImage.m +++ b/sope-appserver/NGObjWeb/DynamicElements/_WOResourceImage.m @@ -95,7 +95,7 @@ if ((rm = [[_ctx component] resourceManager]) == nil) rm = [[_ctx application] resourceManager]; - languages = [_ctx hasSession] ? [[_ctx session] languages] : nil; + languages = [_ctx hasSession] ? [[_ctx session] languages] : (NSArray *)nil; /* If 'framework' binding is not set, use parent component's framework */ if (self->framework){ diff --git a/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m b/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m index f5a8df35..dece927f 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m +++ b/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m @@ -149,10 +149,8 @@ static Class _WODirectActionHyperlinkClass = Nil; #endif return; -#if __APPLE__ - // make Tiger GCC happy - [super dealloc]; -#endif + // make Tiger GCC / gcc 4.1 happy + if (0) [super dealloc]; } @end /* _WOTemporaryHyperlink */ diff --git a/sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.m b/sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.m index 59b3e141..bcf9e0b0 100644 --- a/sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.m +++ b/sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.m @@ -163,7 +163,7 @@ static NSString *cookieDateFormat = @"%a, %d-%b-%Y %H:%M:%S %Z"; - (NSString *)description { NSMutableString *str = [NSMutableString stringWithCapacity:128]; - [str appendFormat:@"<%@[0x%08X]: name=%@ value=%@", + [str appendFormat:@"<%@[0x%p]: name=%@ value=%@", NSStringFromClass([self class]), self, self->name, self->value]; diff --git a/sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m b/sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m index 945a9e86..e3e1bd05 100644 --- a/sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m +++ b/sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m @@ -85,7 +85,7 @@ } - (NSString *)description { - return [NSString stringWithFormat:@"", + return [NSString stringWithFormat:@"", self, [self hostName], [self port]]; } @@ -155,7 +155,7 @@ } - (NSString *)description { - return [NSString stringWithFormat:@"", + return [NSString stringWithFormat:@"", self, self->charsets]; } @@ -214,7 +214,7 @@ } - (NSString *)description { - return [NSString stringWithFormat:@"", + return [NSString stringWithFormat:@"", self, self->types]; } @@ -270,7 +270,7 @@ } - (NSString *)description { - return [NSString stringWithFormat:@"", + return [NSString stringWithFormat:@"", self, self->languages]; } @@ -358,7 +358,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) { - (NSString *)description { return [NSString stringWithFormat: - @"", self, self->value, self->browser, self->majorVersion, self->minorVersion]; @@ -423,7 +423,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) { - (NSString *)description { return [NSString stringWithFormat: - @"", + @"", self, self->keepAlive ? "yes" : "no", self->close ? "yes" : "no", @@ -539,7 +539,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) { } - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: %@>", + return [NSString stringWithFormat:@"<%@[0x%p]: %@>", NSStringFromClass([self class]), self, [self stringValue]]; } @@ -597,7 +597,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) { - (NSString *)description { return [NSString stringWithFormat: - @"", + @"", self, [self userName], self->password ? "yes" : "no" @@ -668,7 +668,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) { } - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: %@>", + return [NSString stringWithFormat:@"<%@[0x%p]: %@>", NSStringFromClass([self class]), self, [self stringValue]]; } diff --git a/sope-appserver/NGObjWeb/OWResourceManager.m b/sope-appserver/NGObjWeb/OWResourceManager.m index 589172b9..33687f2a 100644 --- a/sope-appserver/NGObjWeb/OWResourceManager.m +++ b/sope-appserver/NGObjWeb/OWResourceManager.m @@ -707,7 +707,7 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) return _cdef; cacheKey = [NSArray arrayWithObjects:_name, _languages, nil]; - NSMapInsert(self->componentDefinitions, cacheKey, _cdef ? _cdef : null); + NSMapInsert(self->componentDefinitions, cacheKey, _cdef ? _cdef : (id)null); return _cdef; } @@ -1207,7 +1207,7 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: path=%@>", + return [NSString stringWithFormat:@"<%@[0x%p]: path=%@>", [self class], self, self->base]; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m b/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m index 01f01c38..d66c8687 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m @@ -384,7 +384,7 @@ static int debugOn = 0; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; [self appendAttributesToDescription:ms]; [ms appendString:@">"]; return ms; @@ -393,7 +393,7 @@ static int debugOn = 0; /* Logging */ - (NSString *)loggingPrefix { - return [NSString stringWithFormat:@"[so-action 0x%08X %@]", + return [NSString stringWithFormat:@"[so-action 0x%p %@]", self, self->actionClassName]; } - (BOOL)isDebuggingEnabled { diff --git a/sope-appserver/NGObjWeb/SoObjects/SoClass.m b/sope-appserver/NGObjWeb/SoObjects/SoClass.m index fc399ee2..0d3f9fdb 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoClass.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoClass.m @@ -95,7 +95,8 @@ static BOOL debugOn = NO; [self logWithFormat:@"attempt to set value for invalid slot '%@'", _key]; return; } - [self->slots setObject:(_value ? _value : [NSNull null]) forKey:_key]; + [self->slots setObject:(_value != nil ? _value : (id)[NSNull null]) + forKey:_key]; } - (id)valueForSlot:(NSString *)_key { id value; @@ -106,7 +107,8 @@ static BOOL debugOn = NO; return value; } - (NSArray *)slotNames { - return self->slots ? [self->slots allKeys] : [NSArray array]; + return self->slots != nil + ? [self->slots allKeys] : (NSArray *)[NSArray array]; } /* security */ @@ -162,11 +164,11 @@ static BOOL debugOn = NO; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; if (self->soSuperClass) - [ms appendFormat:@" super=0x%08X", self->soSuperClass]; + [ms appendFormat:@" super=0x%p", self->soSuperClass]; else [ms appendString:@" root"]; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m b/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m index 0c535ff8..6e2531ef 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m @@ -198,7 +198,7 @@ } } - (void)declareObjectProtected:(NSString *)_perm { - _perm = [_perm isNotNull] ? [_perm lowercaseString] : nil; + _perm = [_perm isNotNull] ? [_perm lowercaseString] : (NSString *)nil; if ([_perm length] == 0) { [self logWithFormat:@"tried to declare empty permission !", _perm]; @@ -226,7 +226,7 @@ - (void)declareRole:(NSString *)_role asDefaultForPermission:(NSString *)_per{ id tmp; - _per = [_per isNotNull] ? [_per lowercaseString] : nil; + _per = [_per isNotNull] ? [_per lowercaseString] : (NSString *)nil; if (self->defRoles == nil) self->defRoles = [[NSMutableDictionary alloc] initWithCapacity:8]; @@ -256,7 +256,7 @@ - (void)declareRoles:(NSArray *)_roles asDefaultForPermission:(NSString *)_p { id tmp; - _p = [_p isNotNull] ? [_p lowercaseString] : nil; + _p = [_p isNotNull] ? [_p lowercaseString] : (NSString *)nil; if (self->defRoles == nil) self->defRoles = [[NSMutableDictionary alloc] initWithCapacity:8]; @@ -267,7 +267,7 @@ return; } - tmp = [_roles isNotNull] ? _roles : [NSArray array]; + tmp = [_roles isNotNull] ? _roles : (NSArray *)[NSArray array]; [self->defRoles setObject:tmp forKey:_p]; } @@ -318,7 +318,7 @@ - (NSString *)loggingPrefix { return [self->className length] > 0 ? [NSString stringWithFormat:@"[so-secinfo %@]", self->className] - : [NSString stringWithFormat:@"[so-secinfo 0x%08X]", self]; + : [NSString stringWithFormat:@"[so-secinfo 0x%p]", self]; } - (BOOL)isDebuggingEnabled { static int debugOn = -1; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m b/sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m index 68327361..b2e1d08e 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m @@ -115,11 +115,11 @@ NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; if (self->soSuperClass) - [ms appendFormat:@" super=0x%08X", self->soSuperClass]; + [ms appendFormat:@" super=0x%p", self->soSuperClass]; else [ms appendString:@" root"]; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObject.m b/sope-appserver/NGObjWeb/SoObjects/SoObject.m index 0bcc4abf..c9ca1aa7 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObject.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObject.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2002-2005 SKYRIX Software AG + Copyright (C) 2002-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -24,7 +25,7 @@ #include "SoClass.h" #include "SoSecurityManager.h" #include "WOContext+SoObjects.h" -// #import +#import // for -shallowCopy #include #include #include "common.h" @@ -218,7 +219,7 @@ static void _initialize(void) { NSString *oname; oname = [object nameInContainer]; - [ma addObject:(oname ? oname : (id)[NSNull null])]; + [ma addObject:(oname != nil ? oname : (NSString *)[NSNull null])]; } return ma; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjectMethodDispatcher.m b/sope-appserver/NGObjWeb/SoObjects/SoObjectMethodDispatcher.m index ccd43e1f..d9b38400 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjectMethodDispatcher.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjectMethodDispatcher.m @@ -191,7 +191,7 @@ static BOOL useRedirectsForDefaultMethods = NO; inContext:_ctx]; if (debugOn) { if ([resultObject isKindOfClass:[WOResponse class]]) { - [self debugWithFormat:@"call produced response: 0x%08X (code=%i)", + [self debugWithFormat:@"call produced response: 0x%p (code=%i)", resultObject, [(WOResponse *)resultObject status]]; } else @@ -221,7 +221,7 @@ static BOOL useRedirectsForDefaultMethods = NO; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; if (self->object) diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m b/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m index 6aa2d000..7351f739 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m @@ -422,7 +422,7 @@ static NSString *redirectURISafetySuffix = nil; renderer = nil; e = [[_ctx objectTraversalStack] reverseObjectEnumerator]; - while ((container = [e nextObject])) { + while ((container = [e nextObject]) != nil) { if (![container respondsToSelector: @selector(rendererForObject:inContext:)]) { /* does not provide a renderer factory ... */ @@ -503,9 +503,9 @@ static NSString *redirectURISafetySuffix = nil; BOOL doDispatch; if (debugLogger) { - [self debugWithFormat:@"request 0x%08X: %@ %@ (ctx=0x%08X)", _rq, + [self debugWithFormat:@"request 0x%p: %@ %@ (ctx=0x%p)", _rq, [_rq method], [_rq uri], _ctx]; - if (_sn) [self debugWithFormat:@"session 0x%08X: %@", _sn, _sn]; + if (_sn) [self debugWithFormat:@"session 0x%p: %@", _sn, _sn]; } /* first check safety marker */ @@ -601,7 +601,7 @@ static NSString *redirectURISafetySuffix = nil; else if ([object isKindOfClass:[WOResponse class]]) { r = object; [self debugWithFormat: - @"got response: 0x%08X (status=%i,len=%@,type=%@)", + @"got response: 0x%p (status=%i,len=%@,type=%@)", r, [r status], [r headerForKey:@"content-length"], [r headerForKey:@"content-type"]]; @@ -609,7 +609,7 @@ static NSString *redirectURISafetySuffix = nil; else { if (debugLogger) { if ([object isKindOfClass:[NSData class]]) { - [self debugWithFormat:@"render data 0x%08X[len=%i]", + [self debugWithFormat:@"render data 0x%p[len=%i]", object, [object length]]; } else @@ -621,7 +621,7 @@ static NSString *redirectURISafetySuffix = nil; if (debugLogger) { [self debugWithFormat: - @"made response: 0x%08X (status=%i,len=%@,type=%@)", + @"made response: 0x%p (status=%i,len=%@,type=%@)", r, [r status], [r headerForKey:@"content-length"], [r headerForKey:@"content-type"]]; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m b/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m index ef2bca85..13e0e8df 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m @@ -205,7 +205,7 @@ static int debugOn = 0; /* Logging */ - (NSString *)loggingPrefix { - return [NSString stringWithFormat:@"[so-page 0x%08X %@]", + return [NSString stringWithFormat:@"[so-page 0x%p %@]", self, [self pageName]]; } - (BOOL)isDebuggingEnabled { diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProduct.m b/sope-appserver/NGObjWeb/SoObjects/SoProduct.m index 97656b49..b59ea22b 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProduct.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProduct.m @@ -364,7 +364,7 @@ static int loadDebugOn = 0; unsigned cnt; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if (self->flags.isLoaded) [ms appendFormat:@" loaded"]; @@ -382,7 +382,7 @@ static int loadDebugOn = 0; [ms appendFormat:@" #pubrsrc=%d", cnt]; if (self->resourceManager) - [ms appendFormat:@" rm=0x%08X", self->resourceManager]; + [ms appendFormat:@" rm=0x%p", self->resourceManager]; [ms appendString:@">"]; return ms; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m b/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m index 9b014f98..17c95ea6 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m @@ -264,7 +264,7 @@ static int loadDebugOn = 0; unsigned cnt; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; [ms appendFormat:@" name=%@", self->className]; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m index e272548f..e8eb1408 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m @@ -149,7 +149,7 @@ static int debugOn = 0; /* register */ - [self debugWithFormat:@"register product bundle: '%@' (0x%08X[%@])", + [self debugWithFormat:@"register product bundle: '%@' (0x%p[%@])", bundlePath, _bundle, NSStringFromClass([_bundle class])]; [self debugWithFormat:@" register as product: %@", productName]; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m b/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m index 45e7ed4a..c709217b 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m @@ -84,7 +84,7 @@ static BOOL debugOn = NO; WOResourceManager *rm; rm = [[WOApplication application] resourceManager]; - return (rm == self) ? nil : rm; /* avoid recursion */ + return (rm == self) ? (WOResourceManager *)nil : rm; /* avoid recursion */ } /* lookup resources */ @@ -134,7 +134,7 @@ static BOOL debugOn = NO; _frameworkName, bundle, bproduct]; } return (bproduct == self->product) - ? self : (id)[bproduct resourceManager]; + ? self : (SoProductResourceManager *)[bproduct resourceManager]; } - (NSString *)primaryLookupPathForResourceNamed:(NSString *)_name @@ -463,7 +463,7 @@ static BOOL debugOn = NO; NSMutableString *str; str = [NSMutableString stringWithCapacity:64]; - [str appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self]; + [str appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; [str appendFormat:@" product='%@'", [self->product productName]]; [str appendString:@">"]; return str; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m b/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m index 14e62d96..94a2c5af 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoSecurityManager.m @@ -86,7 +86,7 @@ static int debugOn = -1; NSString *r; r = [NSString stringWithFormat:@"tried to access private object " - @"(0x%08X, SoClass=%@)", + @"(0x%p, SoClass=%@)", _object, [[_object soClass] className]]; return [self makeExceptionForObject:_object reason:r]; } @@ -96,7 +96,7 @@ static int debugOn = -1; NSString *r; r = [NSString stringWithFormat:@"missing permission '%@' on object " - @"(0x%08X, SoClass=%@)", + @"(0x%p, SoClass=%@)", _perm, _object, [[_object soClass] className]]; return [self makeExceptionForObject:_object reason:r]; } @@ -469,7 +469,7 @@ static int debugOn = -1; NSException *e; if ((e = [self validateObject:_value inContext:_ctx])) { - [self debugWithFormat:@"value (0x%08X,%@) of key %@ didn't validate", + [self debugWithFormat:@"value (0x%p,%@) of key %@ didn't validate", _value, NSStringFromClass([_value class]), _key]; return e; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m b/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m index 63f724bd..da9daabf 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m @@ -406,14 +406,14 @@ static BOOL debugOn = NO; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if (self->sel) { [ms appendFormat:@" sel=%@", NSStringFromSelector(self->sel)]; [ms appendFormat:@"(%i args)", self->argCount]; } if (self->object) { - [ms appendFormat:@" bound(0x%08X,%@)", + [ms appendFormat:@" bound(0x%p,%@)", self->object, NSStringFromClass([self->object class])]; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoSubContext.m b/sope-appserver/NGObjWeb/SoObjects/SoSubContext.m index 202ca891..7ce9a18f 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoSubContext.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoSubContext.m @@ -122,7 +122,7 @@ - (NSString *)description { return [NSString stringWithFormat: - @"<0x%08X[%@]: parent=0x%08X>", + @"<0x%p[%@]: parent=0x%p>", (unsigned)self, NSStringFromClass([self class]), [self parentContext]]; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoTemplateRenderer.m b/sope-appserver/NGObjWeb/SoObjects/SoTemplateRenderer.m index 79cac37b..1c6f13f6 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoTemplateRenderer.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoTemplateRenderer.m @@ -181,7 +181,7 @@ static BOOL debugOn = NO; SoSecurityManager *sm; NSException *e; - [self debugWithFormat:@"template renderer render: %@ in ctx 0x%08X", + [self debugWithFormat:@"template renderer render: %@ in ctx 0x%p", _object, _ctx]; sm = [_ctx soSecurityManager]; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoUser.m b/sope-appserver/NGObjWeb/SoObjects/SoUser.m index 4a8e10c6..07de1ca7 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoUser.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoUser.m @@ -85,7 +85,7 @@ NSMutableString *ms; ms = [NSMutableString stringWithCapacity:16]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; [ms appendFormat:@" login=%@", self->login]; [ms appendFormat:@" roles=%@", [self->roles componentsJoinedByString:@","]]; [ms appendString:@">"]; diff --git a/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m b/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m index 585d6b63..da74e719 100644 --- a/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m +++ b/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m @@ -52,7 +52,8 @@ static BOOL debugOn = NO; - (void)addObjectToTraversalStack:(id)_object { if (self->traversalStack == nil) self->traversalStack = [[NSMutableArray alloc] initWithCapacity:16]; - [self->traversalStack addObject:_object ? _object : [NSNull null]]; + [self->traversalStack addObject: + (_object != nil ? _object : (id)[NSNull null])]; } - (id)traversalRoot { diff --git a/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m b/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m index a62c186c..ce54edcc 100644 --- a/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m +++ b/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m @@ -81,7 +81,9 @@ return YES; } - (id)callOnObject:(id)_object inContext:(id)_ctx { - return [_object ? _object : self->parent performActionNamed:self->daName]; + return [(_object != nil) + ? _object + : (id)self->parent performActionNamed:self->daName]; } /* description */ @@ -90,7 +92,7 @@ NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; [ms appendFormat:@" action=%@", self->daName]; [ms appendFormat:@" class=%@", NSStringFromClass([self->parent class])]; [ms appendString:@">"]; diff --git a/sope-appserver/NGObjWeb/SoObjects/WODirectActionRequestHandler+SoObjects.m b/sope-appserver/NGObjWeb/SoObjects/WODirectActionRequestHandler+SoObjects.m index c866374d..f8bc3421 100644 --- a/sope-appserver/NGObjWeb/SoObjects/WODirectActionRequestHandler+SoObjects.m +++ b/sope-appserver/NGObjWeb/SoObjects/WODirectActionRequestHandler+SoObjects.m @@ -61,7 +61,7 @@ WODirectAction *actionObject; WOContext *ctx; - ctx = _ctx ? _ctx : [[WOApplication application] context]; + ctx = _ctx != nil ? _ctx : (id)[[WOApplication application] context]; if ((actionObject = [[clazz alloc] initWithContext:ctx]) == nil) { /* failed to create object */ @@ -71,7 +71,7 @@ return lookupInAction ? [actionObject lookupName:_name inContext:ctx acquire:_ac] - : actionObject; + : (id)actionObject; } return [super lookupName:_name inContext:_ctx acquire:_ac]; diff --git a/sope-appserver/NGObjWeb/Templates/WOComponentScript.m b/sope-appserver/NGObjWeb/Templates/WOComponentScript.m index 86fab87a..0703c854 100644 --- a/sope-appserver/NGObjWeb/Templates/WOComponentScript.m +++ b/sope-appserver/NGObjWeb/Templates/WOComponentScript.m @@ -94,7 +94,7 @@ NSMutableString *ms; ms = [NSMutableString stringWithCapacity:32]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if ([self->language length] > 0) [ms appendFormat:@" language=%@", self->language]; diff --git a/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m b/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m index 54112df4..736ca55c 100644 --- a/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m +++ b/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m @@ -101,7 +101,7 @@ NSMutableString *ms; ms = [NSMutableString stringWithCapacity:32]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if (self->url) { if ([self->url isFileURL]) diff --git a/sope-appserver/NGObjWeb/Templates/WODParser.m b/sope-appserver/NGObjWeb/Templates/WODParser.m index a3d3222f..7e318cf9 100644 --- a/sope-appserver/NGObjWeb/Templates/WODParser.m +++ b/sope-appserver/NGObjWeb/Templates/WODParser.m @@ -291,7 +291,7 @@ static NSException *_makeException(NSException *_exception, [ll release]; } else { - NSLog(@"%s: startPos=0x%08X endPos=0x%08X", __PRETTY_FUNCTION__, + NSLog(@"%s: startPos=0x%p endPos=0x%p", __PRETTY_FUNCTION__, startPos, endPos); } } diff --git a/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m b/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m index 5ebb7d73..75e1a83f 100644 --- a/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m +++ b/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m @@ -266,7 +266,7 @@ static NSException *_makeHtmlException(NSException *_exception, } #if HEAVY_DEBUG else { - //NSLog(@"startPos=0x%08X endPos=0x%08X", startPos, endPos); + //NSLog(@"startPos=0x%p endPos=0x%p", startPos, endPos); } #endif } diff --git a/sope-appserver/NGObjWeb/Templates/WOTemplate.m b/sope-appserver/NGObjWeb/Templates/WOTemplate.m index de63d3d8..11c1949e 100644 --- a/sope-appserver/NGObjWeb/Templates/WOTemplate.m +++ b/sope-appserver/NGObjWeb/Templates/WOTemplate.m @@ -133,7 +133,7 @@ - (NSString *)description { NSMutableString *ms = [NSMutableString stringWithCapacity:128]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if (self->url) { if ([self->url isFileURL]) diff --git a/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m b/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m index bf56967f..b94b12c8 100644 --- a/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m +++ b/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m @@ -494,8 +494,9 @@ static NSDictionary *defaultAssocMap = nil; Class clazz; r = [key rangeOfString:@":"]; - uri = [self namespaceURIForPrefix: - (r.length > 0) ? [key substringToIndex:r.location] : nil]; + uri = (r.length > 0) + ? [key substringToIndex:r.location] : (NSString *)nil; + uri = [self namespaceURIForPrefix:uri]; name = (r.length > 0) ? [key substringFromIndex:(r.location + r.length)] : key; diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 7cf5239c..10b49784 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=238 +SUBMINOR_VERSION:=239 # v4.5.234 requires libDOM v4.5.21 # v4.5.214 requires libNGExtensions v4.5.179 diff --git a/sope-appserver/NGObjWeb/WEClientCapabilities.m b/sope-appserver/NGObjWeb/WEClientCapabilities.m index cdb1c2dc..684df50e 100644 --- a/sope-appserver/NGObjWeb/WEClientCapabilities.m +++ b/sope-appserver/NGObjWeb/WEClientCapabilities.m @@ -772,7 +772,7 @@ - (NSString *)description { NSMutableString *s; - s = [NSMutableString stringWithFormat:@"<%@[0x%08X]:", + s = [NSMutableString stringWithFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; //[s appendFormat:@" ua='%@'", self->userAgent]; diff --git a/sope-appserver/NGObjWeb/WOApplication.m b/sope-appserver/NGObjWeb/WOApplication.m index 1e4bca65..529ed16c 100644 --- a/sope-appserver/NGObjWeb/WOApplication.m +++ b/sope-appserver/NGObjWeb/WOApplication.m @@ -1077,7 +1077,7 @@ nbuckets, nindices, narrays, idxsize); * to explicitly set it. However all accompanied methods should be * extended to pass the correct context where needed. */ - page = [rm pageWithName:(_name != nil ? _name : @"Main") + page = [rm pageWithName:(_name != nil ? _name : (NSString *)@"Main") languages:languages]; [page _setContext:_ctx]; [page ensureAwakeInContext:_ctx]; @@ -1111,7 +1111,7 @@ nbuckets, nindices, narrays, idxsize); if ((rm = [self resourceManager]) == nil) return nil; - return [rm pageWithName:(_name != nil) ? _name : @"Main" + return [rm pageWithName:(_name != nil) ? _name : (NSString *)@"Main" languages:[_req browserLanguages]]; } @@ -1215,7 +1215,7 @@ nbuckets, nindices, narrays, idxsize); str = [NSString stringWithFormat:pageFormat, [_ctx hasSession] ? [[_ctx session] sessionID] - : @"[no session]", + : (NSString *)@"[no session]", [_ctx elementID], [_ctx description], [rq description], @@ -1302,7 +1302,7 @@ nbuckets, nindices, narrays, idxsize); /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: name=%@%@>", + return [NSString stringWithFormat:@"<%@[0x%p]: name=%@%@>", NSStringFromClass([self class]), self, [self name], [self isTerminating] ? @" terminating" : @"" diff --git a/sope-appserver/NGObjWeb/WOComponent.m b/sope-appserver/NGObjWeb/WOComponent.m index 3dbddd05..4b82493f 100644 --- a/sope-appserver/NGObjWeb/WOComponent.m +++ b/sope-appserver/NGObjWeb/WOComponent.m @@ -204,7 +204,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { if (self->componentFlags.isAwake) { [self warnWithFormat: - @"session will dealloc, but component 0x%08X is awake (ctx=%@) !", + @"session will dealloc, but component 0x%p is awake (ctx=%@) !", self, self->context]; [self _sleepWithContext:self->context]; } @@ -274,14 +274,14 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { #endif if (debugComponentAwake) - [self debugWithFormat:@"0x%08X ensureAwakeInContext:0x%08X", self, _ctx]; + [self debugWithFormat:@"0x%p ensureAwakeInContext:0x%p", self, _ctx]; /* sanity check */ if (self->componentFlags.isAwake) { if (self->context == _ctx) { if (debugComponentAwake) - [self debugWithFormat:@"0x%08X already awake:0x%08X", self, _ctx]; + [self debugWithFormat:@"0x%p already awake:0x%p", self, _ctx]; return; } } @@ -318,13 +318,13 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { } - (void)_sleepWithContext:(WOContext *)_ctx { if (debugComponentAwake) - [self debugWithFormat:@"0x%08X _sleepWithContext:0x%08X", self, _ctx]; + [self debugWithFormat:@"0x%p _sleepWithContext:0x%p", self, _ctx]; if (_ctx != self->context) { if ((self->context != nil) && (_ctx != nil)) { /* component is active in different context ... */ [self warnWithFormat: - @"sleep context mismatch (own=0x%08X vs given=0x%08X)", + @"sleep context mismatch (own=0x%p vs given=0x%p)", self->context, _ctx]; return; } @@ -434,7 +434,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { return self->context; [self debugWithFormat: - @"missing context in component 0x%08X (component%s)", + @"missing context in component 0x%p (component%s)", self, self->componentFlags.isAwake ? " is awake" : " is not awake"]; if (abortOnMissingCtx) { @@ -859,7 +859,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { WOElement *template = nil; if (debugTakeValues) - [self debugWithFormat:@"take values from rq 0x%08X", _req]; + [self debugWithFormat:@"take values from rq 0x%p", _req]; NSAssert1(self->componentFlags.isAwake, @"component %@ is not awake !", self); @@ -1209,7 +1209,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { id tmp; str = [NSMutableString stringWithCapacity:128]; - [str appendFormat:@"<0x%08X[%@]: name=%@", self, + [str appendFormat:@"<0x%p[%@]: name=%@", self, NSStringFromClass([self class]), [self name]]; if (self->parentComponent) @@ -1218,7 +1218,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) { [str appendFormat:@" #subs=%i", [self->subcomponents count]]; if (self->componentFlags.isAwake) - [str appendFormat:@" awake=0x%08X", self->context]; + [str appendFormat:@" awake=0x%p", self->context]; else if (self->context == nil) [str appendString:@" no-ctx"]; diff --git a/sope-appserver/NGObjWeb/WOComponentDefinition.m b/sope-appserver/NGObjWeb/WOComponentDefinition.m index 75be04dc..66729546 100644 --- a/sope-appserver/NGObjWeb/WOComponentDefinition.m +++ b/sope-appserver/NGObjWeb/WOComponentDefinition.m @@ -531,7 +531,7 @@ static NSArray *woxExtensions = nil; it just checks the path extension to select the proper builder. */ url = [self->path isKindOfClass:[NSURL class]] - ? (NSURL *)self->path + ? (id)self->path : [[[NSURL alloc] initFileURLWithPath:self->path] autorelease]; if (debugOn) [self debugWithFormat:@"url: %@", [url absoluteString]]; @@ -557,7 +557,7 @@ static NSArray *woxExtensions = nil; - (NSString *)description { NSMutableString *ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if (self->name) [ms appendFormat:@" name=%@", self->name]; if (self->path) [ms appendFormat:@" path=%@", self->path]; diff --git a/sope-appserver/NGObjWeb/WOContext.m b/sope-appserver/NGObjWeb/WOContext.m index eb205819..6b0d2ad2 100644 --- a/sope-appserver/NGObjWeb/WOContext.m +++ b/sope-appserver/NGObjWeb/WOContext.m @@ -668,11 +668,11 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) { sid = [[self session] sessionID]; return [NSString stringWithFormat: - @"<0x%08X[%@]: %@ app=%@ sn=%@ eid=%@ rqeid=%@>", + @"<0x%p[%@]: %@ app=%@ sn=%@ eid=%@ rqeid=%@>", (unsigned)self, NSStringFromClass([self class]), [self contextID], [app name], - sid ? sid : @"none", + sid != nil ? sid : (NSString *)@"none", [self elementID], [self senderID]]; } @@ -763,7 +763,7 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) { else [qs appendString:self->qpJoin]; // TODO: code duplication ... - value = ![value isNotNull] ? nil : [value stringValue]; + value = ![value isNotNull] ? (NSString *)nil : [value stringValue]; key = [key stringByEscapingURL]; value = [value stringByEscapingURL]; @@ -781,7 +781,7 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) { if (isFirst) isFirst = NO; else [qs appendString:self->qpJoin]; - value = ![value isNotNull] ? nil : [value stringValue]; + value = ![value isNotNull] ? (NSString *)nil : [value stringValue]; key = [key stringByEscapingURL]; value = [value stringByEscapingURL]; @@ -1106,7 +1106,7 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) { self->cycleContext = [[NSMutableArray alloc] initWithCapacity:8]; /* add to cursor stack */ - [self->cycleContext addObject:(_obj ? _obj : [NSNull null])]; + [self->cycleContext addObject:(_obj != nil ? _obj : (id)[NSNull null])]; /* set active cursor */ [self setObject:_obj forKey:@"_"]; diff --git a/sope-appserver/NGObjWeb/WOCookie.m b/sope-appserver/NGObjWeb/WOCookie.m index a8662d76..131cc296 100644 --- a/sope-appserver/NGObjWeb/WOCookie.m +++ b/sope-appserver/NGObjWeb/WOCookie.m @@ -196,7 +196,7 @@ static NSString *cookieDateFormat = @"%a, %d-%b-%Y %H:%M:%S %Z"; NSMutableString *str; str = [NSMutableString stringWithCapacity:128]; - [str appendFormat:@"<%@[0x%08X]: name=%@ value=%@", + [str appendFormat:@"<%@[0x%p]: name=%@ value=%@", NSStringFromClass([self class]), self, self->name, self->value]; diff --git a/sope-appserver/NGObjWeb/WOCoreApplication.m b/sope-appserver/NGObjWeb/WOCoreApplication.m index 0cf07811..5cd183f1 100644 --- a/sope-appserver/NGObjWeb/WOCoreApplication.m +++ b/sope-appserver/NGObjWeb/WOCoreApplication.m @@ -698,7 +698,7 @@ static NSMutableArray *activeApps = nil; // THREAD /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: %@>", + return [NSString stringWithFormat:@"<%@[0x%p]: %@>", NSStringFromClass([self class]), self, [self isTerminating] ? @" terminating" : @"" ]; diff --git a/sope-appserver/NGObjWeb/WODisplayGroup.m b/sope-appserver/NGObjWeb/WODisplayGroup.m index 6badbd14..8d7ad6c4 100644 --- a/sope-appserver/NGObjWeb/WODisplayGroup.m +++ b/sope-appserver/NGObjWeb/WODisplayGroup.m @@ -378,10 +378,16 @@ static NSArray *uint0Array = nil; // TODO: maybe we need to retain the selection array and just swap the first idx = [self->objects indexOfObject:_obj]; - idxNumber = (idx != NSNotFound) ? [NSNumber numberWithUnsignedInt:idx] : nil; + idxNumber = (idx != NSNotFound) + ? [NSNumber numberWithUnsignedInt:idx] : (NSNumber *)nil; - if (idxNumber != nil) - [self setSelectionIndexes:[NSArray arrayWithObjects:&idxNumber count:1]]; + if (idxNumber != nil) { + NSArray *a; + + a = [[NSArray alloc] initWithObjects:&idxNumber count:1]; + [self setSelectionIndexes:a]; + [a release]; a = nil; + } else [self setSelectionIndexes:nil]; } @@ -430,7 +436,8 @@ static NSArray *uint0Array = nil; return NO; idx = [self->objects indexOfObject:_obj]; - idxNumber = (idx != NSNotFound) ? [NSNumber numberWithUnsignedInt:idx] : nil; + idxNumber = (idx != NSNotFound) + ? [NSNumber numberWithUnsignedInt:idx] : (NSNumber *)nil; // TODO: should we just exchange the first item and/or call // -setSelectedObject: ? @@ -1033,7 +1040,7 @@ static NSArray *uint0Array = nil; EODataSource *ds; return ([(ds = [self dataSource]) respondsToSelector:_cmd]) - ? [(EODetailDataSource *)ds detailKey] : nil; + ? [(EODetailDataSource *)ds detailKey] : (NSString *)nil; } - (void)setMasterObject:(id)_object { @@ -1185,7 +1192,7 @@ static NSArray *uint0Array = nil; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<0x%08X %@: ds=%@>", + return [NSString stringWithFormat:@"<0x%p %@: ds=%@>", self, NSStringFromClass([self class]), [self dataSource]]; } diff --git a/sope-appserver/NGObjWeb/WODynamicElement.m b/sope-appserver/NGObjWeb/WODynamicElement.m index c1a7102e..f7dfa83e 100644 --- a/sope-appserver/NGObjWeb/WODynamicElement.m +++ b/sope-appserver/NGObjWeb/WODynamicElement.m @@ -106,7 +106,7 @@ static Class FormElementClass = Nil; } - (id)init { - return [self initWithName:[NSString stringWithFormat:@"0x%08X", self] + return [self initWithName:[NSString stringWithFormat:@"0x%p", self] associations:nil template:nil]; } @@ -305,7 +305,7 @@ static Class FormElementClass = Nil; NSMutableString *desc = [NSMutableString stringWithCapacity:100]; NSString *assocDesc = [self associationDescription]; - [desc appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self]; + [desc appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; if (assocDesc) [desc appendString:assocDesc]; [desc appendString:@">"]; diff --git a/sope-appserver/NGObjWeb/WOElement.m b/sope-appserver/NGObjWeb/WOElement.m index 2461122d..764e8614 100644 --- a/sope-appserver/NGObjWeb/WOElement.m +++ b/sope-appserver/NGObjWeb/WOElement.m @@ -146,7 +146,7 @@ static id numStrings[100]; } - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]>", + return [NSString stringWithFormat:@"<%@[0x%p]>", NSStringFromClass([self class]), self]; } @@ -178,8 +178,8 @@ static id numStrings[100]; keys = [_paras keyEnumerator]; while ((key = [keys nextObject]) != nil) { value = [[_paras objectForKey:key] stringValueInComponent:sComponent]; - value = value ? [value stringByEscapingURL] : @""; - key = key ? [key stringByEscapingURL] : @""; + value = value != nil ? [value stringByEscapingURL] : (NSString *)@""; + key = key != nil ? [key stringByEscapingURL] : (NSString *)@""; if (isFirst) isFirst = NO; else [str appendString:@"&"]; @@ -205,8 +205,8 @@ static id numStrings[100]; for (i = 0, count = [values count]; i < count; i++) { value = [values objectAtIndex:i]; value = [value stringValue]; - value = value ? [value stringByEscapingURL] : @""; - key = key ? [key stringByEscapingURL] : @""; + value = value ? [value stringByEscapingURL] : (NSString *)@""; + key = key ? [key stringByEscapingURL] : (NSString *)@""; if (isFirst) isFirst = NO; else [str appendString:@"&"]; @@ -218,8 +218,8 @@ static id numStrings[100]; } else { value = [value stringValue]; - value = value ? [value stringByEscapingURL] : @""; - key = key ? [key stringByEscapingURL] : @""; + value = value ? [value stringByEscapingURL] : (NSString *)@""; + key = key ? [key stringByEscapingURL] : (NSString *)@""; if (isFirst) isFirst = NO; else [str appendString:@"&"]; @@ -230,7 +230,7 @@ static id numStrings[100]; } } - return [str length] > 0 ? str : nil; + return [str isNotEmpty] ? str : (NSMutableString *)nil; } @end /* WOElement */ diff --git a/sope-appserver/NGObjWeb/WOElementID.m b/sope-appserver/NGObjWeb/WOElementID.m index db9b2f9b..50a2bc5f 100644 --- a/sope-appserver/NGObjWeb/WOElementID.m +++ b/sope-appserver/NGObjWeb/WOElementID.m @@ -243,7 +243,7 @@ static int callCount = 0; - (id)currentElementID { return (self->idPos >= self->elementIdCount) ? nil - : self->elementId[(int)self->idPos].string; + : (id)self->elementId[(int)self->idPos].string; } - (id)consumeElementID { (self->idPos)++; diff --git a/sope-appserver/NGObjWeb/WOFileSessionStore.m b/sope-appserver/NGObjWeb/WOFileSessionStore.m index 9caf7763..ea72a67d 100644 --- a/sope-appserver/NGObjWeb/WOFileSessionStore.m +++ b/sope-appserver/NGObjWeb/WOFileSessionStore.m @@ -244,7 +244,7 @@ static BOOL logExpire = YES; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: path=%@>", + return [NSString stringWithFormat:@"<%@[0x%p]: path=%@>", NSStringFromClass([self class]), self, self->snPath]; } diff --git a/sope-appserver/NGObjWeb/WOHTTPConnection.m b/sope-appserver/NGObjWeb/WOHTTPConnection.m index a6a5839a..75530161 100644 --- a/sope-appserver/NGObjWeb/WOHTTPConnection.m +++ b/sope-appserver/NGObjWeb/WOHTTPConnection.m @@ -174,11 +174,11 @@ static BOOL logStream = NO; - (NSString *)loggingPrefix { /* improve perf ... */ if (self->url) { - return [NSString stringWithFormat:@"WOHTTP[0x%08X]<%@>", + return [NSString stringWithFormat:@"WOHTTP[0x%p]<%@>", self, [self->url absoluteString]]; } else - return [NSString stringWithFormat:@"WOHTTP[0x%08X]", self]; + return [NSString stringWithFormat:@"WOHTTP[0x%p]", self]; } /* accessors */ @@ -269,7 +269,8 @@ static BOOL logStream = NO; self->log = nil; self->io = [NGCTextStream alloc]; // keep gcc happy - self->io = [self->io initWithSource:(id)(self->log ? self->log : bStr)]; + self->io = [self->io initWithSource: + (id)(self->log != nil ? self->log : (id)bStr)]; [bStr release]; bStr = nil; } @@ -804,7 +805,7 @@ static BOOL logStream = NO; NSMutableString *str; str = [NSMutableString stringWithCapacity:128]; - [str appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self]; + [str appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; if (self->url) [str appendFormat:@" url=%@", self->url]; if (self->useProxy) [str appendString:@" proxy"]; diff --git a/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m b/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m index 64085784..4c0fafc2 100644 --- a/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m +++ b/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m @@ -426,7 +426,7 @@ static BOOL isForkMaster = YES; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: address=%@>", + return [NSString stringWithFormat:@"<%@[0x%p]: address=%@>", NSStringFromClass([self class]), self, self->address]; } diff --git a/sope-appserver/NGObjWeb/WOMessage.m b/sope-appserver/NGObjWeb/WOMessage.m index f46d659a..212ec943 100644 --- a/sope-appserver/NGObjWeb/WOMessage.m +++ b/sope-appserver/NGObjWeb/WOMessage.m @@ -406,7 +406,7 @@ static __inline__ NSMutableData *_checkBody(WOMessage *self) { #if DEBUG [self warnWithFormat: - @"using NSString to add a character %i,0x%08X" + @"using NSString to add a character %i,0x%p" @"(slow, encoding=%i).", _c, _c, self->contentEncoding]; #endif @@ -510,7 +510,7 @@ static __inline__ NSMutableData *_checkBody(WOMessage *self) { printf("'\n"); for (i = len - 20; i < len; i++) - printf("%5i: 0x%08X %4i\n", i, cstr[i], cstr[i]); + printf("%5i: 0x%p %4i\n", i, cstr[i], cstr[i]); fflush(stdout); } #endif diff --git a/sope-appserver/NGObjWeb/WORequest.m b/sope-appserver/NGObjWeb/WORequest.m index c37f972e..afd8a8eb 100644 --- a/sope-appserver/NGObjWeb/WORequest.m +++ b/sope-appserver/NGObjWeb/WORequest.m @@ -283,7 +283,7 @@ static BOOL debugOn = NO; tmp++; component = ((tmp - cstr) == 0) - ? @"" + ? (id)@"" : [[NSString alloc] initWithCString:cstr length:(tmp - cstr)]; if (component) { @@ -429,7 +429,7 @@ static BOOL debugOn = NO; r = [self->_uri rangeOfString:@"?"]; query = (r.length > 0) ? [self->_uri substringFromIndex:(r.location + r.length)] - : nil; + : (NSString *)nil; if ((ctype = [self headerForKey:@"content-type"]) != nil) { isFormContent = [ctype hasPrefix:@"application/x-www-form-urlencoded"]; @@ -488,7 +488,7 @@ static BOOL debugOn = NO; id paras = [self _getFormParameters]; return [paras respondsToSelector:@selector(objectsForKey:)] ? [paras objectsForKey:_key] - : nil; + : (NSArray *)nil; } - (NSDictionary *)formValues { @@ -681,7 +681,7 @@ static BOOL debugOn = NO; return debugOn; } - (NSString *)loggingPrefix { - return [NSString stringWithFormat:@"|Rq:%@ 0x%08X|", + return [NSString stringWithFormat:@"|Rq:%@ 0x%p|", [self method], self]; } @@ -691,7 +691,7 @@ static BOOL debugOn = NO; NSMutableString *str; str = [NSMutableString stringWithCapacity:256]; - [str appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self]; + [str appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self]; [str appendFormat:@" method=%@", [self method]]; [str appendFormat:@" uri=%@", [self uri]]; [str appendFormat:@" app=%@", self->appName]; diff --git a/sope-appserver/NGObjWeb/WOResourceManager.m b/sope-appserver/NGObjWeb/WOResourceManager.m index ec67480a..aab0c25b 100644 --- a/sope-appserver/NGObjWeb/WOResourceManager.m +++ b/sope-appserver/NGObjWeb/WOResourceManager.m @@ -204,7 +204,7 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path) } - (NSString *)loggingPrefix { char buf[32]; - sprintf(buf, "[wo-rm-0x%08X]", (unsigned)self); + sprintf(buf, "[wo-rm-0x%p]", self); return [NSString stringWithCString:buf]; } @@ -727,7 +727,7 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path) return _cdef; cacheKey = [NSArray arrayWithObjects:_name, _languages, nil]; - NSMapInsert(self->componentDefinitions, cacheKey, _cdef ? _cdef : null); + NSMapInsert(self->componentDefinitions, cacheKey, _cdef ? _cdef : (id)null); return _cdef; } @@ -1171,7 +1171,7 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path) NSMutableString *ms; ms = [NSMutableString stringWithCapacity:32]; - [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])]; if ([self->base length] > 0) [ms appendFormat:@" path='%@'", self->base]; [ms appendString:@">"]; diff --git a/sope-appserver/NGObjWeb/WOResponse.m b/sope-appserver/NGObjWeb/WOResponse.m index 60878883..f564bc8e 100644 --- a/sope-appserver/NGObjWeb/WOResponse.m +++ b/sope-appserver/NGObjWeb/WOResponse.m @@ -296,7 +296,7 @@ static __inline__ char *monthName(int m) { NSData *data; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; [ms appendFormat:@" status=%i", [self status]]; diff --git a/sope-appserver/NGObjWeb/WORunLoop.m b/sope-appserver/NGObjWeb/WORunLoop.m index 69d8c1b6..e5a452ba 100644 --- a/sope-appserver/NGObjWeb/WORunLoop.m +++ b/sope-appserver/NGObjWeb/WORunLoop.m @@ -156,7 +156,7 @@ static char *activityDesc[8] = { - (NSString *)description { return [NSString stringWithFormat: - @"<%@[0x%08X]: object=%@ actitivity=%s>", + @"<%@[0x%p]: object=%@ actitivity=%s>", NSStringFromClass([self class]), self, self->fileObject, activityDesc[self->watchedActivities] diff --git a/sope-appserver/NGObjWeb/WOScriptedComponent.m b/sope-appserver/NGObjWeb/WOScriptedComponent.m index e541725a..9fc436f1 100644 --- a/sope-appserver/NGObjWeb/WOScriptedComponent.m +++ b/sope-appserver/NGObjWeb/WOScriptedComponent.m @@ -248,7 +248,7 @@ static BOOL logScriptDealloc = NO; /* logging */ - (NSString *)loggingPrefix { - return [NSString stringWithFormat:@"script<%@>[0x%08X]", [self name], self]; + return [NSString stringWithFormat:@"script<%@>[0x%p]", [self name], self]; } @end /* WOScriptedComponent */ diff --git a/sope-appserver/NGObjWeb/WOServerSessionStore.m b/sope-appserver/NGObjWeb/WOServerSessionStore.m index e036154f..a1e1bf22 100644 --- a/sope-appserver/NGObjWeb/WOServerSessionStore.m +++ b/sope-appserver/NGObjWeb/WOServerSessionStore.m @@ -263,7 +263,7 @@ static BOOL logExpiredSessions = NO; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: active=%i>", + return [NSString stringWithFormat:@"<%@[0x%p]: active=%i>", NSStringFromClass([self class]), self, [self activeSessionsCount] ]; diff --git a/sope-appserver/NGObjWeb/WOSession.m b/sope-appserver/NGObjWeb/WOSession.m index c965de88..692c228c 100644 --- a/sope-appserver/NGObjWeb/WOSession.m +++ b/sope-appserver/NGObjWeb/WOSession.m @@ -250,8 +250,8 @@ static Class NSDateClass = Nil; page = entry->page; if (logPageCache) { [self debugWithFormat:@"restored permanent page %@ for ctx %@", - page ? [page name] : (id)@"", - _contextID ? _contextID : (id)@""]; + page != nil ? [page name] : (NSString *)@"", + _contextID != nil ? _contextID : (NSString *)@""]; } break; } @@ -272,7 +272,7 @@ static Class NSDateClass = Nil; if ([_contextID isEqualToString:entry->contextID]) { page = entry->page; if (logPageCache) { - [self debugWithFormat:@"restored page %@<0x%08X> for ctx %@", + [self debugWithFormat:@"restored page %@<0x%p> for ctx %@", [page name], page, _contextID]; } break; @@ -662,7 +662,7 @@ static Class NSDateClass = Nil; /* description */ - (NSString *)description { - return [NSString stringWithFormat:@"<%@[0x%08X]: id=%@>", + return [NSString stringWithFormat:@"<%@[0x%p]: id=%@>", NSStringFromClass([self class]), self, [self sessionID]]; } diff --git a/sope-appserver/NGObjWeb/WebDAV/EOFetchSpecification+SoDAV.m b/sope-appserver/NGObjWeb/WebDAV/EOFetchSpecification+SoDAV.m index ba99f607..086f0bf1 100644 --- a/sope-appserver/NGObjWeb/WebDAV/EOFetchSpecification+SoDAV.m +++ b/sope-appserver/NGObjWeb/WebDAV/EOFetchSpecification+SoDAV.m @@ -50,12 +50,13 @@ NSString *scope; scope = [[self hints] objectForKey:@"scope"]; - return [scope length] == 0 ? @"flat" : (id)scope; + return [scope isNotNull] ? scope : (NSString *)@"flat"; } - (BOOL)queryWebDAVPropertyNamesOnly { id v; - if ((v = [[self hints] objectForKey:@"namesOnly"])) + + if ((v = [[self hints] objectForKey:@"namesOnly"]) != nil) return [v boolValue]; return NO; } diff --git a/sope-appserver/NGObjWeb/WebDAV/SoDAVLockManager.m b/sope-appserver/NGObjWeb/WebDAV/SoDAVLockManager.m index 8441f2a3..4e8e128d 100644 --- a/sope-appserver/NGObjWeb/WebDAV/SoDAVLockManager.m +++ b/sope-appserver/NGObjWeb/WebDAV/SoDAVLockManager.m @@ -94,7 +94,7 @@ lockInfo = nil; } } - return lockInfo ? lockInfo->token : nil; + return [lockInfo isNotNull] ? lockInfo->token : (NSString *)nil; } @end /* SoDAVLockManager */ diff --git a/sope-appserver/NGObjWeb/WebDAV/SoObjectResultEntry.m b/sope-appserver/NGObjWeb/WebDAV/SoObjectResultEntry.m index a5057a4d..e59a03cc 100644 --- a/sope-appserver/NGObjWeb/WebDAV/SoObjectResultEntry.m +++ b/sope-appserver/NGObjWeb/WebDAV/SoObjectResultEntry.m @@ -108,14 +108,14 @@ static BOOL debugOn = NO; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; if (self->href) [ms appendFormat:@" uri=%@", self->href]; if (self->object) { - [ms appendFormat:@" obj=0x%08X[%@]", + [ms appendFormat:@" obj=0x%p[%@]", self->object, NSStringFromClass([self->object class])]; } @@ -184,14 +184,14 @@ static BOOL debugOn = NO; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; if (self->href) [ms appendFormat:@" uri=%@", self->href]; if (self->object) { - [ms appendFormat:@" obj=0x%08X[%@]", + [ms appendFormat:@" obj=0x%p[%@]", self->object, NSStringFromClass([self->object class])]; } diff --git a/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m b/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m index 92b3dc9a..6568d9da 100644 --- a/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m +++ b/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m @@ -1728,7 +1728,7 @@ static NSTimeZone *gmt = nil; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:64]; - [ms appendFormat:@"<0x%08X[%@]:", self, + [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass((Class)*(void**)self)]; if (self->object) diff --git a/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m b/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m index f73c0e1e..1b72f3b9 100644 --- a/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m +++ b/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m @@ -585,7 +585,7 @@ static BOOL formatOutput = NO; } if (debugOn) { - [self debugWithFormat:@" render entry: 0x%08X<%@>%s%s", + [self debugWithFormat:@" render entry: 0x%p<%@>%s%s", entry, NSStringFromClass([entry class]), isBrief ? " brief" : "", _namesOnly ? " names-only" : ""]; @@ -910,7 +910,7 @@ static BOOL formatOutput = NO; propMap = [_object davAttributeMapInContext:_ctx]; if (debugOn) { - [self debugWithFormat:@"render search result 0x%08X<%@>", + [self debugWithFormat:@"render search result 0x%p<%@>", _object, NSStringFromClass([_object class])]; } diff --git a/sope-appserver/NGObjWeb/_WOStringTable.m b/sope-appserver/NGObjWeb/_WOStringTable.m index 8d3c5277..f77d6914 100644 --- a/sope-appserver/NGObjWeb/_WOStringTable.m +++ b/sope-appserver/NGObjWeb/_WOStringTable.m @@ -159,7 +159,7 @@ static NSStringEncoding stringFilesEncoding = NSUTF8StringEncoding; NSMutableString *ms; ms = [NSMutableString stringWithCapacity:128]; - [ms appendFormat:@"<0x%08X[%@]: ", self, NSStringFromClass([self class])]; + [ms appendFormat:@"<0x%p[%@]: ", self, NSStringFromClass([self class])]; if (self->path) [ms appendFormat:@" path='%@'", self->path]; if (self->data) [ms appendFormat:@" strings=#%d", [self->data count]]; diff --git a/sope-appserver/NGObjWeb/fhs.make b/sope-appserver/NGObjWeb/fhs.make index caff5ea0..918f11e1 100644 --- a/sope-appserver/NGObjWeb/fhs.make +++ b/sope-appserver/NGObjWeb/fhs.make @@ -5,11 +5,16 @@ 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/ -FHS_SO_DIR=$(FHS_LIB_DIR)sope-$(MAJOR_VERSION).$(MINOR_VERSION)/products/ FHS_MAN_DIR=$(FHS_INSTALL_ROOT)/man +ifeq ($(findstring _64, $(GNUSTEP_TARGET_CPU)), _64) +FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib64/ +else +FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ +endif +FHS_SO_DIR=$(FHS_LIB_DIR)sope-$(MAJOR_VERSION).$(MINOR_VERSION)/products/ + NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" NONFHS_BINDIR="$(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)" -- 2.39.2