title: CLANG Pass-By-Value Warning?
body: <p>The following code compiles fine ...</p>
  
  <pre><code>int main (int argc, const char * argv[]) {
      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  
      // VARIABLES
      MDD *MDD_structure;
      NSString *mddFile = @"/Users/Gary/Code/Mdd/xTest.mdd";
      NSFileHandle *inFile;
      NSData *inBuffer;
      int MDD_fCount;
      int MDD_vCount;
  
      // OPEN FILE ON DISK
      inFile = [NSFileHandle fileHandleForReadingAtPath:mddFile];
      if(inFile == nil) NSLog(@"FILE: Open ... ERROR");
      else NSLog(@"FILE: Open ... OK");
  
      // READ FRAME COUNT
      inBuffer = [inFile readDataOfLength:sizeof(int)];
      [inBuffer getBytes:&amp;MDD_fCount length:sizeof(int)];
      MDD_fCount = CFSwapInt32BigToHost(MDD_fCount);
      NSLog(@"FC: %d", MDD_fCount);
  </code></pre>
  
  <p>But when I run it through the static analyzer "CLANG LLVM 1.0" I get the following ...</p>
  
  <pre><code>warning: Pass-by-value argument in function call is undefined.
           MDD_fCount = CFSwapInt32BigToHost(MDD_fCount);
                        ^                    ~~~~~~~~~~
  1 diagnostic generated.
  </code></pre>
  
  <p>Can anyone tell me what I am missing?</p>
  
  <p>gary</p>