diff --git a/WTReTextField/WTReParser.m b/WTReTextField/WTReParser.m index c899c28..ed0ea0e 100644 --- a/WTReTextField/WTReParser.m +++ b/WTReTextField/WTReParser.m @@ -159,16 +159,16 @@ - (NSString*)displayQuantifier } else if (_countTo == 1) { pat = @"?"; } else { - pat = [NSString stringWithFormat:@"{,%u}", _countTo]; + pat = [NSString stringWithFormat:@"{,%lu}", (unsigned long)_countTo]; } } else if (_countFrom == 1 && _countTo == NSUIntegerMax) { pat = @"+"; } else if (_countFrom == _countTo) { - pat = [NSString stringWithFormat:@"{%u}", _countFrom]; + pat = [NSString stringWithFormat:@"{%lu}", (unsigned long)_countFrom]; } else if (_countTo == NSUIntegerMax) { - pat = [NSString stringWithFormat:@"{%u,}", _countFrom]; + pat = [NSString stringWithFormat:@"{%lu,}", (unsigned long)_countFrom]; } else { - pat = [NSString stringWithFormat:@"{%u,%u}", _countFrom, _countTo]; + pat = [NSString stringWithFormat:@"{%lu,%lu}", (unsigned long)_countFrom, (unsigned long)_countTo]; } if (_greedy) return pat; @@ -508,7 +508,7 @@ - (BOOL)isValidEscapedChar:(unichar)c inCharset:(BOOL)inCharset - (void)raiseParserError:(NSString*)error atPos:(NSUInteger)pos { NSString *pat = [NSString stringWithFormat:@"%@ \u25B6%@", [_pattern substringToIndex:pos], [_pattern substringFromIndex:pos]]; - @throw [NSException exceptionWithName:@"Parse error" reason:[NSString stringWithFormat:@"%@ @ pos %d: %@", error, pos, pat] userInfo:nil]; + @throw [NSException exceptionWithName:@"Parse error" reason:[NSString stringWithFormat:@"%@ @ pos %lu: %@", error, (unsigned long)pos, pat] userInfo:nil]; } - (WTReCharacterBase*)parseCharset:(NSString*)pattern inRange:(NSRange)range enclosed:(BOOL)enclosed