Skip to content

Commit

Permalink
Fix several va_arg errors revealed by LLVM GCC 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mpakes committed Aug 10, 2011
1 parent 06b79c1 commit b85d298
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/FMDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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--;
Expand All @@ -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) {
Expand Down

0 comments on commit b85d298

Please sign in to comment.