<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -418,8 +418,11 @@ typedef unsigned int NSUInteger;
     size_t writeLength;
     UTF8String = [multipartBegin UTF8String];
     writeLength = strlen(UTF8String);
-    NSAssert([outputStream write:(uint8_t *)UTF8String maxLength:writeLength] == writeLength, @&quot;Must write multipartBegin&quot;);
-
+	
+	size_t __unused actualWrittenLength;
+	actualWrittenLength = [outputStream write:(uint8_t *)UTF8String maxLength:writeLength];
+    NSAssert(actualWrittenLength == writeLength, @&quot;Must write multipartBegin&quot;);
+	
     // open the input stream
     const size_t bufferSize = 65536;
     size_t readSize = 0;
@@ -432,7 +435,10 @@ typedef unsigned int NSUInteger;
             break;
         }
         
-        NSAssert (readSize == [outputStream write:buffer maxLength:readSize], @&quot;Must completes the writing&quot;);
+		
+		size_t __unused actualWrittenLength;
+		actualWrittenLength = [outputStream write:buffer maxLength:readSize];
+        NSAssert (actualWrittenLength == readSize, @&quot;Must completes the writing&quot;);
     }
     
     [inImageStream close];
@@ -441,7 +447,8 @@ typedef unsigned int NSUInteger;
     
     UTF8String = [multipartEnd UTF8String];
     writeLength = strlen(UTF8String);
-    NSAssert([outputStream write:(uint8_t *)UTF8String maxLength:writeLength] == writeLength, @&quot;Must write multipartBegin&quot;);
+	actualWrittenLength = [outputStream write:(uint8_t *)UTF8String maxLength:writeLength];
+    NSAssert(actualWrittenLength == writeLength, @&quot;Must write multipartBegin&quot;);
     [outputStream close];
     
 #if MAC_OS_X_VERSION_MAX_ALLOWED &lt;= MAC_OS_X_VERSION_10_4                
@@ -540,12 +547,15 @@ typedef unsigned int NSUInteger;
     if (uploadTempFilename) {
         NSFileManager *fileManager = [NSFileManager defaultManager];
         if ([fileManager fileExistsAtPath:uploadTempFilename]) {
+			BOOL __unused removeResult = NO;
 #if MAC_OS_X_VERSION_MAX_ALLOWED &lt;= MAC_OS_X_VERSION_10_4                
-            NSAssert([fileManager removeFileAtPath:uploadTempFilename handler:nil], @&quot;Should be able to remove temp file&quot;);
+			removeResult = [fileManager removeFileAtPath:uploadTempFilename handler:nil];
 #else
 			NSError *error = nil;
-			NSAssert([fileManager removeItemAtPath:uploadTempFilename error:&amp;error], @&quot;Should be able to remove temp file&quot;);
+			removeResult = [fileManager removeItemAtPath:uploadTempFilename error:&amp;error];
 #endif
+			
+			NSAssert(removeResult, @&quot;Should be able to remove temp file&quot;);
         }
         
         [uploadTempFilename release];</diff>
      <filename>Source/ObjectiveFlickr.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0e556a99f826dad32c0e21ec43d912709b8a34bd</id>
    </parent>
  </parents>
  <author>
    <name>Lukhnos D. Liu</name>
    <email>lukhnos@lithoglyph.com</email>
  </author>
  <url>http://github.com/lukhnos/objectiveflickr/commit/518062aabee5e110805d32cf379d69d9f67ab862</url>
  <id>518062aabee5e110805d32cf379d69d9f67ab862</id>
  <committed-date>2009-09-12T07:44:31-07:00</committed-date>
  <authored-date>2009-09-12T07:44:31-07:00</authored-date>
  <message>Avoids evaluations inside NSAssert--it's a bad style.

This is because some Release configurations prefer NS_BLOCK_ASSERTIONS,
which makes NSAssert NOP.

Also, suppresses compiler/analyzer warnings on unused assertion flags
when NS_BLOCK_ASSERTIONS is set, cf.:
http://www.cocoabuilder.com/archive/message/cocoa/2008/4/3/203168
(note: that thread is also a good discussion on the pros and cons of
using NS_BLOCK_ASSERTIONS).

Credit to John Debay for bringing up this issue:
http://code.google.com/p/objectiveflickr/issues/detail?id=7</message>
  <tree>d4af07c483b8746d4a9be1830cff071faf89b36b</tree>
  <committer>
    <name>Lukhnos D. Liu</name>
    <email>lukhnos@lithoglyph.com</email>
  </committer>
</commit>
