Monday, September 19, 2011

Conversion specifies type 'unsigned int' but the argument has type 'unsigned long long'

Been quite busy with maintenance issues lately (close to release), no time to blog. So here's just a small tip until I get into more interesting new development tasks:
unsigned long long bodyLen =
  (unsigned long long) [self.bodyPrefix length] +
  // ALAsset defaultRepresentation size returns (long long)
  (unsigned long long) fileSize +
  (unsigned long long) [self.bodySuffix length];
DLog(@"Total data size to send: %llu", bodyLen);
[request setValue:[NSString stringWithFormat:@"%llu", bodyLength] forHTTPHeaderField:@"Content-Length"];
In case you missed, the "printf" parameter to display unsigned long long is %llu...

No comments:

Post a Comment