Merge lp:~rockstar/ubuntuone-ios-music/project-settings into lp:ubuntuone-ios-music
- project-settings
- Merge into trunk
Proposed by
Paul Hummer
Status: | Merged |
---|---|
Approved by: | Paul Hummer |
Approved revision: | 238 |
Merged at revision: | 228 |
Proposed branch: | lp:~rockstar/ubuntuone-ios-music/project-settings |
Merge into: | lp:ubuntuone-ios-music |
Diff against target: |
307 lines (+41/-34) 13 files modified
Dependencies/JSONKit/JSONKit.m (+18/-18) Dependencies/oauthconsumer/OAMutableURLRequest.m (+1/-1) Dependencies/oauthconsumer/OATokenManager.m (+1/-1) SynthesizeSingleton.h (+1/-1) U1Music.xcodeproj/project.pbxproj (+5/-3) categories/UIImage+Resize.m (+4/-0) utilities/AudioStreamer.h (+2/-2) utilities/AudioStreamer.m (+3/-3) utilities/Reachability.h (+1/-0) utilities/U1SocketListener.h (+1/-1) utilities/U1StreamWriter.h (+2/-2) utilities/operations/Downloader.m (+1/-1) utilities/operations/U1ChunkDownloadOperation.m (+1/-1) |
To merge this branch: | bzr merge lp:~rockstar/ubuntuone-ios-music/project-settings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zachery Bir | Approve | ||
Review via email: mp+120020@code.launchpad.net |
Commit message
Update u1music project settings
Description of the change
Update the u1music project settings, kill most of the warnings.
The only warnings I didn't kill were the Categories re-implementing methods. It's encouraged that we use inheritance for that (and rightly so). However, that means refactoring, which I don't think we want to do right now.
This branch was SUPER educational.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Dependencies/JSONKit/JSONKit.m' |
2 | --- Dependencies/JSONKit/JSONKit.m 2011-07-10 22:17:52 +0000 |
3 | +++ Dependencies/JSONKit/JSONKit.m 2012-08-16 21:23:21 +0000 |
4 | @@ -742,14 +742,14 @@ |
5 | - (void)getObjects:(id *)objectsPtr range:(NSRange)range |
6 | { |
7 | NSParameterAssert((objects != NULL) && (count <= capacity)); |
8 | - if((objectsPtr == NULL) && (NSMaxRange(range) > 0UL)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: pointer to objects array is NULL but range length is %lu", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSMaxRange(range)]; } |
9 | - if((range.location > count) || (NSMaxRange(range) > count)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSMaxRange(range), count]; } |
10 | + if((objectsPtr == NULL) && (NSMaxRange(range) > 0UL)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: pointer to objects array is NULL but range length is %u", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSMaxRange(range)]; } |
11 | + if((range.location > count) || (NSMaxRange(range) > count)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%u) beyond bounds (%u)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), NSMaxRange(range), count]; } |
12 | memcpy(objectsPtr, objects + range.location, range.length * sizeof(id)); |
13 | } |
14 | |
15 | - (id)objectAtIndex:(NSUInteger)objectIndex |
16 | { |
17 | - if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count]; } |
18 | + if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%u) beyond bounds (%u)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count]; } |
19 | NSParameterAssert((objects != NULL) && (count <= capacity) && (objects[objectIndex] != NULL)); |
20 | return(objects[objectIndex]); |
21 | } |
22 | @@ -770,7 +770,7 @@ |
23 | { |
24 | if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; } |
25 | if(anObject == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to insert nil", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; } |
26 | - if(objectIndex > count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count + 1UL]; } |
27 | + if(objectIndex > count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%u) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count + 1UL]; } |
28 | #ifdef __clang_analyzer__ |
29 | [anObject retain]; // Stupid clang analyzer... Issue #19. |
30 | #else |
31 | @@ -783,7 +783,7 @@ |
32 | - (void)removeObjectAtIndex:(NSUInteger)objectIndex |
33 | { |
34 | if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; } |
35 | - if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count]; } |
36 | + if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%u) beyond bounds (%u)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count]; } |
37 | _JKArrayRemoveObjectAtIndex(self, objectIndex); |
38 | mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL; |
39 | } |
40 | @@ -792,7 +792,7 @@ |
41 | { |
42 | if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; } |
43 | if(anObject == NULL) { [NSException raise:NSInvalidArgumentException format:@"*** -[%@ %@]: attempt to insert nil", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; } |
44 | - if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count]; } |
45 | + if(objectIndex >= count) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%u) beyond bounds (%u)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), objectIndex, count]; } |
46 | #ifdef __clang_analyzer__ |
47 | [anObject retain]; // Stupid clang analyzer... Issue #19. |
48 | #else |
49 | @@ -2559,17 +2559,17 @@ |
50 | // supported classes, we fail the second type (i.e., double fault error). |
51 | BOOL rerunningAfterClassFormatter = NO; |
52 | rerunAfterClassFormatter: |
53 | - if(JK_EXPECT_T(object->isa == encodeState->fastClassLookup.stringClass)) { isClass = JKClassString; } |
54 | - else if(JK_EXPECT_T(object->isa == encodeState->fastClassLookup.numberClass)) { isClass = JKClassNumber; } |
55 | - else if(JK_EXPECT_T(object->isa == encodeState->fastClassLookup.dictionaryClass)) { isClass = JKClassDictionary; } |
56 | - else if(JK_EXPECT_T(object->isa == encodeState->fastClassLookup.arrayClass)) { isClass = JKClassArray; } |
57 | - else if(JK_EXPECT_T(object->isa == encodeState->fastClassLookup.nullClass)) { isClass = JKClassNull; } |
58 | + if(JK_EXPECT_T(object_getClass(object) == encodeState->fastClassLookup.stringClass)) { isClass = JKClassString; } |
59 | + else if(JK_EXPECT_T(object_getClass(object) == encodeState->fastClassLookup.numberClass)) { isClass = JKClassNumber; } |
60 | + else if(JK_EXPECT_T(object_getClass(object) == encodeState->fastClassLookup.dictionaryClass)) { isClass = JKClassDictionary; } |
61 | + else if(JK_EXPECT_T(object_getClass(object) == encodeState->fastClassLookup.arrayClass)) { isClass = JKClassArray; } |
62 | + else if(JK_EXPECT_T(object_getClass(object) == encodeState->fastClassLookup.nullClass)) { isClass = JKClassNull; } |
63 | else { |
64 | - if(JK_EXPECT_T([object isKindOfClass:[NSString class]])) { encodeState->fastClassLookup.stringClass = object->isa; isClass = JKClassString; } |
65 | - else if(JK_EXPECT_T([object isKindOfClass:[NSNumber class]])) { encodeState->fastClassLookup.numberClass = object->isa; isClass = JKClassNumber; } |
66 | - else if(JK_EXPECT_T([object isKindOfClass:[NSDictionary class]])) { encodeState->fastClassLookup.dictionaryClass = object->isa; isClass = JKClassDictionary; } |
67 | - else if(JK_EXPECT_T([object isKindOfClass:[NSArray class]])) { encodeState->fastClassLookup.arrayClass = object->isa; isClass = JKClassArray; } |
68 | - else if(JK_EXPECT_T([object isKindOfClass:[NSNull class]])) { encodeState->fastClassLookup.nullClass = object->isa; isClass = JKClassNull; } |
69 | + if(JK_EXPECT_T([object isKindOfClass:[NSString class]])) { encodeState->fastClassLookup.stringClass = object_getClass(object); isClass = JKClassString; } |
70 | + else if(JK_EXPECT_T([object isKindOfClass:[NSNumber class]])) { encodeState->fastClassLookup.numberClass = object_getClass(object); isClass = JKClassNumber; } |
71 | + else if(JK_EXPECT_T([object isKindOfClass:[NSDictionary class]])) { encodeState->fastClassLookup.dictionaryClass = object_getClass(object); isClass = JKClassDictionary; } |
72 | + else if(JK_EXPECT_T([object isKindOfClass:[NSArray class]])) { encodeState->fastClassLookup.arrayClass = object_getClass(object); isClass = JKClassArray; } |
73 | + else if(JK_EXPECT_T([object isKindOfClass:[NSNull class]])) { encodeState->fastClassLookup.nullClass = object_getClass(object); isClass = JKClassNull; } |
74 | else { |
75 | if((rerunningAfterClassFormatter == NO) && ( |
76 | #ifdef __BLOCKS__ |
77 | @@ -2751,7 +2751,7 @@ |
78 | for(id keyObject in enumerateObject) { |
79 | if(JK_EXPECT_T(printComma)) { if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ","))) { return(1); } } |
80 | printComma = 1; |
81 | - if(JK_EXPECT_F((keyObject->isa != encodeState->fastClassLookup.stringClass)) && JK_EXPECT_F(([keyObject isKindOfClass:[NSString class]] == NO))) { jk_encode_error(encodeState, @"Key must be a string object."); return(1); } |
82 | + if(JK_EXPECT_F((object_getClass(keyObject) != encodeState->fastClassLookup.stringClass)) && JK_EXPECT_F(([keyObject isKindOfClass:[NSString class]] == NO))) { jk_encode_error(encodeState, @"Key must be a string object."); return(1); } |
83 | if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, keyObject))) { return(1); } |
84 | if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ":"))) { return(1); } |
85 | if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, (void *)CFDictionaryGetValue((CFDictionaryRef)object, keyObject)))) { return(1); } |
86 | @@ -2762,7 +2762,7 @@ |
87 | for(idx = 0L; idx < dictionaryCount; idx++) { |
88 | if(JK_EXPECT_T(printComma)) { if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ","))) { return(1); } } |
89 | printComma = 1; |
90 | - if(JK_EXPECT_F(((id)keys[idx])->isa != encodeState->fastClassLookup.stringClass) && JK_EXPECT_F([(id)keys[idx] isKindOfClass:[NSString class]] == NO)) { jk_encode_error(encodeState, @"Key must be a string object."); return(1); } |
91 | + if(JK_EXPECT_F((object_getClass((id)keys[idx])) != encodeState->fastClassLookup.stringClass) && JK_EXPECT_F([(id)keys[idx] isKindOfClass:[NSString class]] == NO)) { jk_encode_error(encodeState, @"Key must be a string object."); return(1); } |
92 | if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, keys[idx]))) { return(1); } |
93 | if(JK_EXPECT_F(jk_encode_write1(encodeState, 0L, ":"))) { return(1); } |
94 | if(JK_EXPECT_F(jk_encode_add_atom_to_buffer(encodeState, objects[idx]))) { return(1); } |
95 | |
96 | === modified file 'Dependencies/oauthconsumer/OAMutableURLRequest.m' |
97 | --- Dependencies/oauthconsumer/OAMutableURLRequest.m 2011-07-10 22:17:52 +0000 |
98 | +++ Dependencies/oauthconsumer/OAMutableURLRequest.m 2012-08-16 21:23:21 +0000 |
99 | @@ -129,7 +129,7 @@ |
100 | |
101 | - (void)_generateTimestamp { |
102 | [timestamp release]; |
103 | - timestamp = [[NSString alloc]initWithFormat:@"%d", time(NULL)]; |
104 | + timestamp = [[NSString alloc]initWithFormat:@"%ld", time(NULL)]; |
105 | } |
106 | |
107 | - (void)_generateNonce { |
108 | |
109 | === modified file 'Dependencies/oauthconsumer/OATokenManager.m' |
110 | --- Dependencies/oauthconsumer/OATokenManager.m 2011-07-10 22:17:52 +0000 |
111 | +++ Dependencies/oauthconsumer/OATokenManager.m 2012-08-16 21:23:21 +0000 |
112 | @@ -93,7 +93,7 @@ |
113 | [self exchangeToken]; |
114 | } else { |
115 | [authorizedTokenKey release]; |
116 | - authorizedTokenKey = [aKey retain]; |
117 | + authorizedTokenKey = [aKey copy]; |
118 | } |
119 | } |
120 | |
121 | |
122 | === modified file 'SynthesizeSingleton.h' |
123 | --- SynthesizeSingleton.h 2010-09-24 05:34:15 +0000 |
124 | +++ SynthesizeSingleton.h 2012-08-16 21:23:21 +0000 |
125 | @@ -58,7 +58,7 @@ |
126 | return NSUIntegerMax; \ |
127 | } \ |
128 | \ |
129 | -- (void)release \ |
130 | +- (oneway void)release \ |
131 | { \ |
132 | } \ |
133 | \ |
134 | |
135 | === modified file 'U1Music.xcodeproj/project.pbxproj' |
136 | --- U1Music.xcodeproj/project.pbxproj 2012-08-13 16:35:03 +0000 |
137 | +++ U1Music.xcodeproj/project.pbxproj 2012-08-16 21:23:21 +0000 |
138 | @@ -1216,7 +1216,7 @@ |
139 | 29B97313FDCFA39411CA2CEA /* Project object */ = { |
140 | isa = PBXProject; |
141 | attributes = { |
142 | - LastUpgradeCheck = 0420; |
143 | + LastUpgradeCheck = 0440; |
144 | ORGANIZATIONNAME = Canonical; |
145 | }; |
146 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "U1Music" */; |
147 | @@ -1497,7 +1497,8 @@ |
148 | GCC_OPTIMIZATION_LEVEL = 0; |
149 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
150 | GCC_PREFIX_HEADER = U1Music_Prefix.pch; |
151 | - GCC_VERSION = com.apple.compilers.llvmgcc42; |
152 | + GCC_THUMB_SUPPORT = NO; |
153 | + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; |
154 | INFOPLIST_FILE = "U1Music-Info.plist"; |
155 | LIBRARY_SEARCH_PATHS = ( |
156 | "$(inherited)", |
157 | @@ -1527,7 +1528,8 @@ |
158 | CURRENT_PROJECT_VERSION = 6; |
159 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
160 | GCC_PREFIX_HEADER = U1Music_Prefix.pch; |
161 | - GCC_VERSION = com.apple.compilers.llvmgcc42; |
162 | + GCC_THUMB_SUPPORT = NO; |
163 | + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; |
164 | INFOPLIST_FILE = "U1Music-Info.plist"; |
165 | IPHONEOS_DEPLOYMENT_TARGET = 4.0; |
166 | LIBRARY_SEARCH_PATHS = ( |
167 | |
168 | === modified file 'categories/UIImage+Resize.m' |
169 | --- categories/UIImage+Resize.m 2011-05-02 07:33:18 +0000 |
170 | +++ categories/UIImage+Resize.m 2012-08-16 21:23:21 +0000 |
171 | @@ -189,6 +189,8 @@ |
172 | transform = CGAffineTransformTranslate(transform, 0, newSize.height); |
173 | transform = CGAffineTransformRotate(transform, -M_PI_2); |
174 | break; |
175 | + default: |
176 | + break; |
177 | } |
178 | |
179 | switch (self.imageOrientation) { |
180 | @@ -203,6 +205,8 @@ |
181 | transform = CGAffineTransformTranslate(transform, newSize.height, 0); |
182 | transform = CGAffineTransformScale(transform, -1, 1); |
183 | break; |
184 | + default: |
185 | + break; |
186 | } |
187 | |
188 | return transform; |
189 | |
190 | === modified file 'utilities/AudioStreamer.h' |
191 | --- utilities/AudioStreamer.h 2012-02-17 20:55:09 +0000 |
192 | +++ utilities/AudioStreamer.h 2012-08-16 21:23:21 +0000 |
193 | @@ -25,7 +25,7 @@ |
194 | #import <UIKit/UIKit.h> |
195 | #else |
196 | #import <Cocoa/Cocoa.h> |
197 | -#endif TARGET_OS_IPHONE |
198 | +#endif // TARGET_OS_IPHONE |
199 | |
200 | #include <pthread.h> |
201 | #include <AudioToolbox/AudioToolbox.h> |
202 | @@ -170,7 +170,7 @@ |
203 | } |
204 | |
205 | @property AudioStreamerErrorCode errorCode; |
206 | -@property (readonly) AudioStreamerState state; |
207 | +@property (nonatomic, readonly) AudioStreamerState state; |
208 | @property (readonly) AudioStreamerStopReason stopReason; |
209 | @property (readonly) double progress; |
210 | @property (readonly) double duration; |
211 | |
212 | === modified file 'utilities/AudioStreamer.m' |
213 | --- utilities/AudioStreamer.m 2012-02-17 20:55:09 +0000 |
214 | +++ utilities/AudioStreamer.m 2012-08-16 21:23:21 +0000 |
215 | @@ -56,7 +56,7 @@ |
216 | NSString * const AS_AUDIO_BUFFER_TOO_SMALL_STRING = @"Audio packets are larger than kAQDefaultBufSize."; |
217 | |
218 | @interface AudioStreamer () <UIAlertViewDelegate> |
219 | -@property (readwrite) AudioStreamerState state; |
220 | +@property (nonatomic, readwrite) AudioStreamerState state; |
221 | @property UIBackgroundTaskIdentifier bgTaskId; |
222 | |
223 | - (void)handlePropertyChangeForFileStream:(AudioFileStreamID)inAudioFileStream |
224 | @@ -649,7 +649,7 @@ |
225 | if (fileLength > 0 && seekByteOffset > 0) |
226 | { |
227 | CFHTTPMessageSetHeaderFieldValue(message, CFSTR("Range"), |
228 | - (CFStringRef)[NSString stringWithFormat:@"bytes=%ld-%ld", seekByteOffset, fileLength]); |
229 | + (CFStringRef)[NSString stringWithFormat:@"bytes=%u-%u", seekByteOffset, fileLength]); |
230 | discontinuous = YES; |
231 | } |
232 | |
233 | @@ -765,7 +765,7 @@ |
234 | if (state != AS_STOPPING && |
235 | state != AS_STOPPED) |
236 | { |
237 | - NSLog(@"### Not starting audio thread. State code is: %ld", state); |
238 | + NSLog(@"### Not starting audio thread. State code is: %u", state); |
239 | } |
240 | self.state = AS_INITIALIZED; |
241 | [pool release]; |
242 | |
243 | === modified file 'utilities/Reachability.h' |
244 | --- utilities/Reachability.h 2010-09-20 20:32:15 +0000 |
245 | +++ utilities/Reachability.h 2012-08-16 21:23:21 +0000 |
246 | @@ -48,6 +48,7 @@ |
247 | |
248 | #import <Foundation/Foundation.h> |
249 | #import <SystemConfiguration/SystemConfiguration.h> |
250 | +#import <netinet/in.h> |
251 | |
252 | typedef enum { |
253 | NotReachable = 0, |
254 | |
255 | === modified file 'utilities/U1SocketListener.h' |
256 | --- utilities/U1SocketListener.h 2012-02-07 23:01:23 +0000 |
257 | +++ utilities/U1SocketListener.h 2012-08-16 21:23:21 +0000 |
258 | @@ -23,7 +23,7 @@ |
259 | |
260 | @interface U1SocketListener : NSObject |
261 | |
262 | -@property (copy) U1SocketListenerAcceptHandler acceptHandler; |
263 | +@property (nonatomic, copy) U1SocketListenerAcceptHandler acceptHandler; |
264 | |
265 | + (U1SocketListener*)localListenerWithPort:(NSUInteger)port error:(NSError **)error; |
266 | |
267 | |
268 | === modified file 'utilities/U1StreamWriter.h' |
269 | --- utilities/U1StreamWriter.h 2012-02-15 22:15:38 +0000 |
270 | +++ utilities/U1StreamWriter.h 2012-08-16 21:23:21 +0000 |
271 | @@ -25,8 +25,8 @@ |
272 | |
273 | @interface U1StreamWriter : NSObject |
274 | |
275 | -@property (copy) U1StreamWriterErrorHandler errorHandler; |
276 | -@property (copy) void(^completionHandler)(); |
277 | +@property (nonatomic, copy) U1StreamWriterErrorHandler errorHandler; |
278 | +@property (nonatomic, copy) void(^completionHandler)(); |
279 | @property (assign) id<U1StreamWriterDelegate> delegate; |
280 | |
281 | - (id)initWithDescriptor:(U1Descriptor*)aSocket; |
282 | |
283 | === modified file 'utilities/operations/Downloader.m' |
284 | --- utilities/operations/Downloader.m 2012-02-17 19:45:46 +0000 |
285 | +++ utilities/operations/Downloader.m 2012-08-16 21:23:21 +0000 |
286 | @@ -172,7 +172,7 @@ |
287 | [chunkRanges enumerateObjectsUsingBlock:^(id rangeValue, NSUInteger idx, BOOL *stop) { |
288 | NSRange range = [rangeValue rangeValue]; |
289 | |
290 | - NSString *path = [[tmpDir path] stringByAppendingPathComponent:[NSString stringWithFormat:@"%lu.chunk", idx]]; |
291 | + NSString *path = [[tmpDir path] stringByAppendingPathComponent:[NSString stringWithFormat:@"%u.chunk", idx]]; |
292 | |
293 | U1ChunkDownloadOperation *chunk = [[U1ChunkDownloadOperation alloc] initWithUrl:url path:path andRange:range]; |
294 | |
295 | |
296 | === modified file 'utilities/operations/U1ChunkDownloadOperation.m' |
297 | --- utilities/operations/U1ChunkDownloadOperation.m 2012-02-08 23:56:03 +0000 |
298 | +++ utilities/operations/U1ChunkDownloadOperation.m 2012-08-16 21:23:21 +0000 |
299 | @@ -22,7 +22,7 @@ |
300 | - (id)initWithUrl:(NSURL *)url path:(NSString *)aPath andRange:(NSRange)aRange; |
301 | { |
302 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; |
303 | - NSString *requestRange = [NSString stringWithFormat:@"bytes=%lu-%lu", aRange.location, NSMaxRange(aRange) - 1]; |
304 | + NSString *requestRange = [NSString stringWithFormat:@"bytes=%u-%u", aRange.location, NSMaxRange(aRange) - 1]; |
305 | [request setValue:requestRange forHTTPHeaderField:@"Range"]; |
306 | |
307 | self = [super initWithRequest:request]; |
Looks good, land it!