From 68f0e574bafb99ff9f692f34cadf408da135dd92 Mon Sep 17 00:00:00 2001 From: rfm Date: Wed, 5 Jul 2006 07:05:03 +0000 Subject: [PATCH] Tidy some warning suppression cleanups git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23129 72102866-910b-0410-8b05-ffd578937521 --- Model/GMArchiver.m | 10 +++++----- Source/NSSelection.m | 2 +- Source/NSTextView.m | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Model/GMArchiver.m b/Model/GMArchiver.m index 78b19b667..41b085b68 100644 --- a/Model/GMArchiver.m +++ b/Model/GMArchiver.m @@ -238,7 +238,7 @@ return @"nil"; } else { - id label; + NSString *label; id upperObjectRepresentation; anObject = [anObject replacementObjectForModelArchiver: self]; @@ -258,7 +258,7 @@ } } - if (!label) { + if (label != nil) { Class archiveClass; /* If the object gets encoded on the top level, set the label to be @@ -289,7 +289,7 @@ -encodeObject: withName: message, save its label into the topLevelObjects array. */ if (!level) - [topLevelObjects addObject: (name ? (id)name : (id)label)]; + [topLevelObjects addObject: (name ? name : label)]; lastObjectRepresentation = objectPList; @@ -577,9 +577,9 @@ - (NSString*) classNameEncodedForTrueClassName: (NSString*)trueName { - id inArchiveName = [(id)NSMapGet(classes, trueName) className]; + NSString *inArchiveName = [(id)NSMapGet(classes, trueName) className]; - return inArchiveName ? (NSString*)inArchiveName : (NSString*)trueName; + return inArchiveName ? inArchiveName : trueName; } /* In the following method the version of class named trueName is written as diff --git a/Source/NSSelection.m b/Source/NSSelection.m index 19abf1046..cd78ad1ab 100644 --- a/Source/NSSelection.m +++ b/Source/NSSelection.m @@ -248,7 +248,7 @@ typedef enum [aDecoder decodeValueOfObjCType: @encode(int) at: &_selectionType]; [aDecoder decodeValueOfObjCType: @encode(id) - at: obj]; + at: &obj]; ASSIGN(_descriptionData, obj); } diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 411063b07..7acc66dd9 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -723,9 +723,10 @@ that makes decoding and encoding compatible with the old code. if ([aDecoder containsValueForKey: @"NSSharedData"]) { NSTextViewSharedData *shared; - unsigned int flags = [shared flags]; + unsigned int flags; shared = [aDecoder decodeObjectForKey: @"NSSharedData"]; + flags = [shared flags]; ASSIGN(_insertionPointColor, [shared insertionColor]); ASSIGN(_backgroundColor, [shared backgroundColor]);