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

Commit 84a5bf3

Browse files
committed
warnings down to 72
1 parent 2dd6ee8 commit 84a5bf3

13 files changed

+34
-26
lines changed

MPWBridgeReader.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ +(void)parseBridgeDict:aDict forContext:aContext
3939
id pool=[NSAutoreleasePool new];
4040
id reader = [[[self alloc] initWithContext:aContext] autorelease];
4141
[reader parse:aDict];
42-
NSLog(@"%d total elements",[reader count]);
42+
// NSLog(@"%d total elements",(int)[reader count]);
4343
[pool release];
4444
}
4545

MPWMASONParser.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ -(void)pushTag:(id)aTag
5858

5959
}
6060

61-
-(NSString*)makeRetainedJSONStringStart:(const char*)start length:(int)len
61+
-(NSString*)makeRetainedJSONStringStart:(const char*)start length:(long)len
6262
{
6363
NSString *curstr;
6464
if ( commonStrings ) {

MPWMAXParser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ typedef id (*XMLIMP6)(id, SEL, id,id,id,id,id,id);
125125
-(BOOL)parse:(NSData*)xmlData; // process the XML data passed, start sending element(1) or tag(2)
126126
// messages to the configured handlers according to the
127127
// NSMAXParserDelegate 'protocol' and message patterns.
128+
-(instancetype)initWithData:(NSData*)data;
128129
-(BOOL)parse;
129130
-(BOOL)parseDataFromURL:(NSURL*)url;
130131
-(id)parsedDataFromURL:(id)theUrlOrString;

MPWMAXParser.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ -(void)setDataEncoding:(int)newEncoding
121121
dataCache=[[MPWObjectCache alloc] initWithCapacity:90 class:[MPWSubData class]];
122122
[dataCache setUnsafeFastAlloc:YES];
123123
getData = (XMLIMP0)[dataCache getObjectIMP];
124-
initDataBytesLength=(XMLIMP3)[MPWSubData
124+
initDataBytesLength=(XMLIMP1CharP1L1)[MPWSubData
125125
instanceMethodForSelector:@selector(reInitWithData:bytes:length:)];
126126
uniqueTagForCString=(XMLIMP3)[self methodForSelector: @selector(getTagForCString:length:)];
127127
[self _growTagStack:INITIALTAGSTACKDEPTH];
@@ -856,7 +856,7 @@ -(IMP)boolMethodForSelector:(SEL)sel defaultValue:(BOOL)defaultValue forReceiver
856856
}
857857

858858

859-
-(void)_growTagStack:(unsigned)newCapacity
859+
-(void)_growTagStack:(long)newCapacity
860860
{
861861
// NSLog(@"growStack to: %d",newCapacity);
862862
void *newStack = ALLOC_POINTERS( (newCapacity+10)* sizeof (NSXMLElementInfo) );
@@ -874,17 +874,17 @@ -(void)_growTagStack:(unsigned)newCapacity
874874
-(void)setDelegate:handler
875875
{
876876
[self _setDocumentHandler:handler];
877-
beginElement = [self defaultedVoidMethodForSelector:BEGINELEMENTSELECTOR forReceiver:handler];
877+
beginElement = (XMLIMP5)[self defaultedVoidMethodForSelector:BEGINELEMENTSELECTOR forReceiver:handler];
878878
// NSLog(@"beginElement: %x for %@",beginElement,NSStringFromSelector(BEGINELEMENTSELECTOR));
879-
endElement = [self defaultedVoidMethodForSelector:ENDELEMENTSELECTOR forReceiver:handler];
879+
endElement = (XMLIMP4)[self defaultedVoidMethodForSelector:ENDELEMENTSELECTOR forReceiver:handler];
880880
// NSLog(@"endElementSelector: %@",NSStringFromSelector(ENDELEMENTSELECTOR));
881881

882-
characterDataAllowed = [self boolMethodForSelector:@selector(characterDataAllowed:) defaultValue:YES forReceiver:self ];
882+
characterDataAllowed = (XMLIMP1)[self boolMethodForSelector:@selector(characterDataAllowed:) defaultValue:YES forReceiver:self ];
883883

884884
[self setCharacterHandlerWithDocumentHandler:handler];
885885

886-
characters = [self defaultedVoidMethodForSelector:CHARACTERSSELECTOR forReceiver:characterHandler];
887-
cdata = [self defaultedVoidMethodForSelector:CDATASELECTOR forReceiver:characterHandler];
886+
characters = (XMLIMP2)[self defaultedVoidMethodForSelector:CHARACTERSSELECTOR forReceiver:characterHandler];
887+
cdata = (XMLIMP2)[self defaultedVoidMethodForSelector:CDATASELECTOR forReceiver:characterHandler];
888888
// NSLog(@"document-handler now %@",documentHandler);
889889
}
890890

MPWMAXParser_private.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ typedef struct _NSXMLElementInfo {
3131
const char *start;
3232
const char *end;
3333
BOOL isIncomplete;
34-
int integerTag;
35-
int fullyQualifiedLen;
34+
long integerTag;
35+
long fullyQualifiedLen;
3636
MPWTagAction *action;
3737
MPWTagHandler *handler;
3838
} NSXMLElementInfo;
@@ -96,7 +96,7 @@ typedef struct _NSXMLElementInfo {
9696

9797
objectAccessor_h( NSError, parserError, setParserError )
9898

99-
-(void)_growTagStack:(unsigned)newCapacity;
99+
-(void)_growTagStack:(long)newCapacity;
100100
-currentTag;
101101
-(void)pushTag:aTag;
102102
-(void)popTag;

MPWXmlAppleProplistReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
3737
}
3838

3939

40-
-realElement:(const char*)start length:(int)len;
40+
-realElement:(const char*)start length:(long)len;
4141
-integerElement:(id <NSXMLAttributes>)children attributes:(id <NSXMLAttributes>)attrs parser:(MPWMAXParser*)parser;
4242

4343
@end

MPWXmlAppleProplistReader.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ @implementation MPWXmlAppleProplistReader
7070
return [[NSDictionary alloc] initWithObjects:values forKeys:keys count:count/2];
7171
}
7272

73-
-integerElementAtPtr:(const char*)start length:(int)len
73+
-integerElementAtPtr:(const char*)start length:(long)len
7474
{
7575
int val=0;
7676
int sign=1;
@@ -89,7 +89,7 @@ @implementation MPWXmlAppleProplistReader
8989
return (id)CFNumberCreate( allocator, kCFNumberSInt32Type, &val );
9090
}
9191

92-
-realElement:(const char*)start length:(int)len
92+
-realElement:(const char*)start length:(long)len
9393
{
9494
double val=0;
9595
double sign=1;

MPWXmlArchiver.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ -(void)encodeXmlOn:aCoder withName:(const char*)name
386386

387387
-(void)encodeWithXmlCoder:(NSCoder*)aCoder
388388
{
389-
[self encodeWithCoder:aCoder];
389+
[(id)self encodeWithCoder:aCoder];
390390
}
391391

392392
@end

MPWXmlFastInfosetParser.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ -(void)parseElement:(unsigned char)startByte
200200
namespace = [self parseNamespace];
201201
}
202202
name=[self parseNameStartingOnFirstBit];
203-
[documentHandler parser:PARSERSELF didStartElement:name namespaceURI:nil qualifiedName:nil attributes:nil];
203+
[documentHandler parser:PARSERSELF didStartElement:name namespaceURI:nil qualifiedName:nil attributes:@{}];
204204
[self parseElementContent];
205205
[documentHandler parser:PARSERSELF didEndElement:name namespaceURI:nil qualifiedName:nil ];
206206

@@ -273,7 +273,7 @@ +(void)testVerifyFI
273273

274274
+(NSArray*)testSelectors
275275
{
276-
return [NSArray arrayWithObjects:
276+
return @[
277277
#if 0
278278
@"testVerifyFI",
279279
@"testBasicSaxParse",
@@ -284,7 +284,7 @@ +(NSArray*)testSelectors
284284
@"testEmptyElementWithAttribute",
285285
@"testNamespaceParsingMPWXML",
286286
#endif
287-
nil];
287+
];
288288
}
289289

290290

MPWXmlGeneratorStream.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ typedef void (^XmlGeneratorBlock)(MPWXmlGeneratorStream* );
6969
-(void)indent;
7070
-(void)outdent;
7171
-(void)cr;
72-
-(void)writeCData:(NSData*)data;
7372
-(void)writeNSDataContent:(NSData*)data;
7473
-(void)writeContent:anObject;
7574
-(void)setShouldIndent:(BOOL)should;

0 commit comments

Comments
 (0)