signedness of an integer value (-Wsign-conversion).
Error is: ASIHTTPRequest.m:4571:44: Division by zero I think this may be a false warning, or llvm is assuming that "[bandwidthUsageTracker addObject:...];" has failed for some reason, but it does no harm to double check that we're not going to divide by zero.
It seems the comparison has always been against the wrong enum, so the check would never trigger previously. The latest llvm issues a warning like this: ASIDataDecompressor.m:161:34: Comparison of constant 'NSStreamEventErrorOccurred' (8) with expression of type 'NSStreamStatus' (aka 'enum NSStreamStatus') is always false [patch from github user 'OpenFibers', thanks!]
Identical patches submitted by both Carson Reinke & yllan - thanks!
In iOS 5, the ASIAuthenticationDialog could not be dismissed using either the Cancel button or automatically by successfully logging in. The bug is due to a change in UIViewController in iOS 5. The class & instance "dismiss" methods are using [UIViewController parentViewController] which, as of iOS 5, no longer returns the presenting view controller. A new property called 'presentingViewController' was added in iOS 5 to make up for this. Changed the class & instance dismiss methods to use the "presentingViewController" property if it is available (iOS 5+). If not, it falls back to the "parentViewController" property.
Previously, tasks running from inside the CFRunLoop would call CFRunLoopStop prior to finishing execution. This results in non-deterministic failures to call endBackgroundTask when running iOS tasks in the background with beginBackgroundTaskWithExpirationHandler. Since the only reason to break out of the CFRunLoop is to flush the autorelease pool, we instead invoke CFRunLoopRunInMode with returnAfterSourceHandled=True, which safely returns and flushes the autorelease pool after each invocation of the CFRunLoop.