Permalink
Browse files

Fix warnings related to format strings in sources directly related to…

… Vienna.
  • Loading branch information...
barijaona committed Aug 18, 2012
1 parent 67e1f57 commit 2627497c61d5a0dd6bfb658bb38c6e1a6763847b
Showing with 113 additions and 113 deletions.
  1. +1 −1 AdvancedPreferences.m
  2. +4 −4 Database.m
  3. +1 −1 DownloadManager.m
  4. +1 −1 Field.m
  5. +2 −2 Folder.m
  6. +1 −1 GoogleReader.m
  7. +2 −2 RefreshManager.m
  8. +97 −97 StringExtensions.m
  9. +3 −3 TreeNode.m
  10. +1 −1 XMLSourceWindow.m
View
@@ -63,7 +63,7 @@ -(void)initializePreferences
// Show use JavaScript option
[useJavaScriptButton setState:[prefs useJavaScript] ? NSOnState : NSOffState];
- [concurrentDownloads selectItemWithTitle:[NSString stringWithFormat:@"%d",[prefs concurrentDownloads]]];
+ [concurrentDownloads selectItemWithTitle:[NSString stringWithFormat:@"%ld",[prefs concurrentDownloads]]];
}
/* changeUseJavaScript
View
@@ -837,7 +837,7 @@ -(NSInteger)addFolder:(NSInteger)parentId afterChild:(NSInteger)predecessorId fo
NSUInteger index = 1;
while (([self folderFromName:name]) != nil)
- name = [NSString stringWithFormat:@"%@ (%i)", oldName, index++];
+ name = [NSString stringWithFormat:@"%@ (%li)", oldName, index++];
}
NSInteger nextSibling = 0;
@@ -2017,7 +2017,7 @@ -(NSString *)sqlScopeForFolder:(Folder *)folder flags:(NSInteger)scopeFlags
// Straightforward folder is <something>
if (!subScope)
- return [NSString stringWithFormat:@"%@%@%d", [field sqlField], operatorString, folderId];
+ return [NSString stringWithFormat:@"%@%@%ld", [field sqlField], operatorString, folderId];
// For under/not-under operators, we're creating a SQL statement of the format
// (folder_id = <value1> || folder_id = <value2>...). It is possible to try and simplify
@@ -2036,7 +2036,7 @@ -(NSString *)sqlScopeForFolder:(Folder *)folder flags:(NSInteger)scopeFlags
Folder * folder = [childFolders objectAtIndex:index];
if (index > 0)
[sqlString appendString:conditionString];
- [sqlString appendFormat:@"%@%@%d", [field sqlField], operatorString, [folder itemId]];
+ [sqlString appendFormat:@"%@%@%ld", [field sqlField], operatorString, [folder itemId]];
}
if (count > 1)
[sqlString appendString:@")"];
@@ -2128,7 +2128,7 @@ -(NSString *)criteriaToSQL:(CriteriaTree *)criteriaTree
spanOfDays = 7;
}
- criteriaValue = [NSString stringWithFormat:@"%d/%d/%d %d:%d:%d", [startDate dayOfMonth], [startDate monthOfYear], [startDate yearOfCommonEra], 0, 0, 0];
+ criteriaValue = [NSString stringWithFormat:@"%ld/%ld/%ld %d:%d:%d", [startDate dayOfMonth], [startDate monthOfYear], [startDate yearOfCommonEra], 0, 0, 0];
startDate = [NSCalendarDate dateWithString:criteriaValue calendarFormat:@"%d/%m/%Y %H:%M:%S"];
if ([criteria operator] == MA_CritOper_Is)
View
@@ -335,7 +335,7 @@ -(void)cancelItem:(DownloadItem *)item
-(void)downloadFile:(NSString *)filename fromURL:(NSString *)url
{
NSURLRequest * theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
- NSURLDownload * theDownload = [[NSURLDownload alloc] initWithRequest:theRequest delegate:self];
+ NSURLDownload * theDownload = [[NSURLDownload alloc] initWithRequest:theRequest delegate:(id)self];
if (theDownload)
{
DownloadItem * newItem = [[DownloadItem alloc] init];
View
@@ -188,7 +188,7 @@ -(BOOL)visible
*/
-(NSString *)description
{
- return [NSString stringWithFormat:@"('%@', displayName='%@', sqlField='%@', tag=%d, width=%d, visible=%d)", name, displayName, sqlField, tag, width, visible];
+ return [NSString stringWithFormat:@"('%@', displayName='%@', sqlField='%@', tag=%ld, width=%d, visible=%d)", name, displayName, sqlField, tag, width, visible];
}
/* encodeWithCoder
View
@@ -774,7 +774,7 @@ -(NSString *)feedSourceFilePath
NSString * feedSourceFilePath = nil;
if ([self isRSSFolder])
{
- NSString * feedSourceFileName = [NSString stringWithFormat:@"folder%i.xml", [self itemId]];
+ NSString * feedSourceFileName = [NSString stringWithFormat:@"folder%li.xml", [self itemId]];
feedSourceFilePath = [[[Preferences standardPreferences] feedSourcesFolder] stringByAppendingPathComponent:feedSourceFileName];
}
return feedSourceFilePath;
@@ -810,7 +810,7 @@ -(NSScriptObjectSpecifier *)objectSpecifier
*/
-(NSString *)description
{
- return [NSString stringWithFormat:@"Folder id %d (%@)", itemId, [self name]];
+ return [NSString stringWithFormat:@"Folder id %ld (%@)", itemId, [self name]];
}
/* dealloc
View
@@ -125,7 +125,7 @@ -(ASIHTTPRequest*)refreshFeed:(Folder*)thisFolder withLog:(ActivityItem *)aItem
NSInteger articleLimit = ignoreLimit ? 10000 : 100;
- NSURL *refreshFeedUrl = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.google.com/reader/api/0/stream/contents/feed/%@?client=%@&comments=false&likes=false&r=n&n=%i&ot=%@&ck=%@&T=%@&access_token=%@", [GTMOAuth2Authentication encodedOAuthValueForString:[thisFolder feedURL]],ClientName,articleLimit,folderLastUpdate,TIMESTAMP, token, token]];
+ NSURL *refreshFeedUrl = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.google.com/reader/api/0/stream/contents/feed/%@?client=%@&comments=false&likes=false&r=n&n=%li&ot=%@&ck=%@&T=%@&access_token=%@", [GTMOAuth2Authentication encodedOAuthValueForString:[thisFolder feedURL]],ClientName,articleLimit,folderLastUpdate,TIMESTAMP, token, token]];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:refreshFeedUrl];
[request setDelegate:self];
View
@@ -769,7 +769,7 @@ -(void)finalizeFolderRefresh:(NSDictionary*)parameters;
// title. The solution is to use the link and title and build a GUID from those.
// We add the folderId at the beginning to ensure that items in different feeds do not share a guid.
if ([articleGuid isEqualToString:@""])
- articleGuid = [NSString stringWithFormat:@"%d-%@-%@", folderId, [newsItem link], [newsItem title]];
+ articleGuid = [NSString stringWithFormat:@"%ld-%@-%@", folderId, [newsItem link], [newsItem title]];
// This is a horrible hack for horrible feeds that contain more than one item with the same guid.
// Bad feeds! I'm talking to you, WordPress Trac.
@@ -849,7 +849,7 @@ -(void)finalizeFolderRefresh:(NSDictionary*)parameters;
NSUInteger index = 1;
while (([db folderFromName:feedTitle]) != nil)
- feedTitle = [NSString stringWithFormat:@"%@ (%i)", oldFeedTitle, index++];
+ feedTitle = [NSString stringWithFormat:@"%@ (%li)", oldFeedTitle, index++];
[connectorItem setName:feedTitle];
[db setFolderName:folderId newName:feedTitle];
Oops, something went wrong.

0 comments on commit 2627497

Please sign in to comment.