1.1 --- a/BLIP/BLIPProperties.m Tue Jun 03 16:56:33 2008 -0700
1.2 +++ b/BLIP/BLIPProperties.m Wed Apr 22 16:45:39 2009 -0700
1.3 @@ -69,7 +69,7 @@
1.4 else
1.5 props = [BLIPProperties properties];
1.6
1.7 - *usedLength = props ?length :-1;
1.8 + *usedLength = props ?(ssize_t)length :-1;
1.9 return props;
1.10 }
1.11
1.12 @@ -132,7 +132,7 @@
1.13 goto fail;
1.14
1.15 // The data consists of consecutive NUL-terminated strings, alternating key/value:
1.16 - unsigned capacity = 0;
1.17 + int capacity = 0;
1.18 const char *end = bytes+length;
1.19 for( const char *str=bytes; str < end; str += strlen(str)+1, _nStrings++ ) {
1.20 if( _nStrings >= capacity ) {
1.21 @@ -285,7 +285,7 @@
1.22 static void appendStr( NSMutableData *data, NSString *str ) {
1.23 const char *utf8 = [str UTF8String];
1.24 size_t size = strlen(utf8)+1;
1.25 - for( int i=0; i<kNAbbreviations; i++ )
1.26 + for( unsigned i=0; i<kNAbbreviations; i++ )
1.27 if( memcmp(utf8,kAbbreviations[i],size)==0 ) {
1.28 const UInt8 abbrev[2] = {i+1,0};
1.29 [data appendBytes: &abbrev length: 2];
1.30 @@ -345,7 +345,7 @@
1.31
1.32 props = [BLIPProperties properties];
1.33 CAssert(props);
1.34 - CAssertEq(props.count,0);
1.35 + CAssertEq(props.count,0U);
1.36 Log(@"Empty properties:\n%@", props.allProperties);
1.37 NSData *data = props.encodedData;
1.38 Log(@"As data: %@", data);
1.39 @@ -359,7 +359,7 @@
1.40
1.41 ssize_t used;
1.42 props = [BLIPProperties propertiesWithEncodedData: data usedLength: &used];
1.43 - CAssertEq(used,data.length);
1.44 + CAssertEq(used,(ssize_t)data.length);
1.45 CAssertEqual(props,mprops);
1.46
1.47 [mprops setValue: @"Jens" ofProperty: @"First-Name"];
1.48 @@ -377,7 +377,7 @@
1.49 CAssertEq(used,0);
1.50 }
1.51 props = [BLIPProperties propertiesWithEncodedData: data usedLength: &used];
1.52 - CAssertEq(used,data.length);
1.53 + CAssertEq(used,(ssize_t)data.length);
1.54 Log(@"Read back in:\n%@",props.allProperties);
1.55 CAssertEqual(props,mprops);
1.56