Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix several va_arg errors revealed by LLVM GCC 4.2

  • Loading branch information...
commit b85d2980e0d38a63ab0c08d2d2ca1aa6519ae830 1 parent 06b79c1
@mpakes mpakes authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/FMDatabase.m
View
8 src/FMDatabase.m
@@ -346,7 +346,7 @@ - (void)_extractSQL:(NSString *)sql argumentsList:(va_list)args intoString:(NSMu
case '@':
arg = va_arg(args, id); break;
case 'c':
- arg = [NSString stringWithFormat:@"%c", va_arg(args, char)]; break;
+ arg = [NSString stringWithFormat:@"%c", va_arg(args, int)]; break;
case 's':
arg = [NSString stringWithUTF8String:va_arg(args, char*)]; break;
case 'd':
@@ -359,10 +359,10 @@ - (void)_extractSQL:(NSString *)sql argumentsList:(va_list)args intoString:(NSMu
case 'h':
i++;
if (i < length && [sql characterAtIndex:i] == 'i') {
- arg = [NSNumber numberWithShort:va_arg(args, short)];
+ arg = [NSNumber numberWithInt:va_arg(args, int)];
}
else if (i < length && [sql characterAtIndex:i] == 'u') {
- arg = [NSNumber numberWithUnsignedShort:va_arg(args, unsigned short)];
+ arg = [NSNumber numberWithInt:va_arg(args, int)];
}
else {
i--;
@@ -383,7 +383,7 @@ - (void)_extractSQL:(NSString *)sql argumentsList:(va_list)args intoString:(NSMu
case 'f':
arg = [NSNumber numberWithDouble:va_arg(args, double)]; break;
case 'g':
- arg = [NSNumber numberWithFloat:va_arg(args, float)]; break;
+ arg = [NSNumber numberWithDouble:va_arg(args, double)]; break;
case 'l':
i++;
if (i < length) {
Please sign in to comment.
Something went wrong with that request. Please try again.