Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit a859433

Browse files
committed
warnings down to 65
1 parent 84a5bf3 commit a859433

File tree

5 files changed

+24
-30
lines changed

5 files changed

+24
-30
lines changed

MPWAtomParser.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ @implementation MPWAtomParser(testing)
6161
+(NSArray*)parseTestFeed:(NSString*)feedName type:(NSString*)feedType
6262
{
6363
NSString *path=[[NSBundle bundleForClass:self] pathForResource:feedName ofType:feedType ];
64-
NSData *xmlData = [NSData dataWithContentsOfMappedFile:path];
64+
NSData *xmlData = [NSData dataWithContentsOfFile:path options:NSDataReadingMappedAlways error:nil];
6565
EXPECTNOTNIL(xmlData,@"data");
6666
MPWAtomParser *parser = [[[self alloc] init] autorelease];
6767
//NSLog(@" === parser: %@",parser);
@@ -112,4 +112,4 @@ +(void)testLinks
112112
}
113113

114114

115-
@end
115+
@end

MPWFeedItem.h

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,16 @@
1212

1313
@interface MPWFeedItem : NSObject
1414
{
15-
NSString*guid;
16-
NSString*title;
17-
NSString*category;
18-
NSString*imageLink;
19-
NSString*pubDate;
20-
NSDictionary*remainder;
21-
NSMutableArray*links;
2215
}
2316

24-
-(NSString*)guid;
25-
-(NSString*)title;
26-
-(NSString*)category;
27-
-(NSString*)link;
28-
-(NSString*)pubDate;
29-
-(NSDictionary*)remainder;
17+
@property (nonatomic, strong) NSString *guid;
18+
@property (nonatomic, strong) NSString *title;
19+
@property (nonatomic, strong) NSString *category;
20+
@property (nonatomic, strong) NSString *imageLink;
21+
@property (nonatomic, strong) NSString *pubDate;
22+
@property (nonatomic, strong) NSDictionary *remainder;
23+
@property (nonatomic, strong) NSMutableArray *links;
3024

31-
-(void)setRemainder:(NSDictionary*)newRemainder;
3225

3326
@end
3427

MPWFeedItem.m

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@
1212

1313
@implementation MPWFeedItem
1414

15-
objectAccessor( NSString, guid, setGuid )
16-
objectAccessor( NSString, title, setTitle )
17-
objectAccessor( NSString, category, setCategory )
18-
objectAccessor( NSArray, links, setLinks )
19-
objectAccessor( NSString, imageLink, setImageLink )
20-
objectAccessor( NSString, pubDate, setPubDate )
21-
objectAccessor( NSDictionary, remainder, setRemainder )
2215

2316
-(void)setLink:(NSString*)aLink
2417
{
2518
MPWAtomLink* link=[[[MPWAtomLink alloc] init] autorelease];
2619
[link setHref:aLink];
27-
[self setLinks:[NSArray arrayWithObject:link]];
20+
[self setLinks:[NSMutableArray arrayWithObject:link]];
2821
}
2922

3023
-(NSString*)link
@@ -34,12 +27,12 @@ -(NSString*)link
3427

3528
-(void)dealloc
3629
{
37-
[guid release];
38-
[title release];
39-
[category release];
40-
[links release];
41-
[imageLink release];
42-
[pubDate release];
30+
[_guid release];
31+
[_title release];
32+
[_category release];
33+
[_links release];
34+
[_imageLink release];
35+
[_pubDate release];
4336
[super dealloc];
4437
}
4538

MPWMAXParser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ typedef id (*XMLIMP6)(id, SEL, id,id,id,id,id,id);
122122
@property(assign) BOOL shouldProcessNamespaces;//
123123
@property(assign) int undefinedTagAction;
124124

125+
objectAccessor_h( NSError, parserError, setParserError )
126+
125127
-(BOOL)parse:(NSData*)xmlData;// process the XML data passed, start sending element(1) or tag(2)
126128
// messages to the configured handlers according to the
127129
// NSMAXParserDelegate 'protocol' and message patterns.

MPWXmlRpcGeneratorStream.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
#define TARGET _target
1212

13+
@interface NSObject(generateXmlRPCOnStream)
14+
15+
-(void)generateXmlRPCOnStream:aStream;
16+
17+
@end
18+
1319
@implementation MPWXmlRpcGeneratorStream
1420

1521
-(SEL)streamWriterMessage

0 commit comments

Comments
 (0)