Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning:Comparison of constant 8 with expression of type XXXX is always false

I used ASIHTTPRequest in my project,but in the file ASIDataCompressor.m line 190:

if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {
        if (err) {
            *err = [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of %@ failed because we were unable to write to the destination data file at %@",sourcePath,destinationPath],NSLocalizedDescriptionKey,[outputStream streamError],NSUnderlyingErrorKey,nil]];
        }
        [compressor closeStream];
        return NO;
    }

it warning me this:

Warning

Any one know how to fix it? thx

like image 801
yellow Avatar asked Dec 21 '12 02:12

yellow


1 Answers

(NSStreamStatus)NSStreamEventErrorOccurred

edit

Probably the correct way to handle this is to replace the NSStreamEventErrorOccurred with NSStreamStatusError. That's probably what the author of ASIHTTP intended.

like image 190
nielsbot Avatar answered Dec 27 '22 16:12

nielsbot