Camino only - Bug 390819: Enable -Wall for all targets, fix resulting new warnings. r/sr=mento

This commit is contained in:
stuart.morgan%alumni.case.edu 2007-08-07 17:22:26 +00:00
Родитель faedf5b386
Коммит 4a23ff532f
9 изменённых файлов: 19 добавлений и 23 удалений

Просмотреть файл

@ -1006,7 +1006,7 @@ PR_STATIC_CALLBACK(int) compareValues(nsICookie* aCookie1, nsICookie* aCookie2,
//
NSEnumerator *theEnum = [indexToRemove reverseObjectEnumerator];
NSNumber *currentItem;
while (currentItem = [theEnum nextObject])
while ((currentItem = [theEnum nextObject]))
mCachedPermissions->RemoveObjectAt([currentItem intValue]);
}
}
@ -1031,7 +1031,7 @@ PR_STATIC_CALLBACK(int) compareValues(nsICookie* aCookie1, nsICookie* aCookie2,
//
NSEnumerator *theEnum = [indexToRemove reverseObjectEnumerator];
NSNumber *currentItem;
while (currentItem = [theEnum nextObject])
while ((currentItem = [theEnum nextObject]))
mCachedCookies->RemoveObjectAt([currentItem intValue]);
}
}

Просмотреть файл

@ -16,9 +16,6 @@ LIBRARY_SEARCH_PATHS = ../dist/bin ../dist/lib
HEADER_SEARCH_PATHS = ../dist/include/ ../dist/include/appcomps ../dist/include/caps ../dist/include/chardet ../dist/include/chrome ../dist/include/commandhandler ../dist/include/composer ../dist/include/content ../dist/include/cookie ../dist/include/docshell ../dist/include/dom ../dist/include/editor ../dist/include/embed_base ../dist/include/exthandler ../dist/include/find ../dist/include/gfx ../dist/include/helperAppDlg ../dist/include/history ../dist/include/htmlparser ../dist/include/intl ../dist/include/js ../dist/include/layout ../dist/include/locale ../dist/include/mimetype ../dist/include/mork ../dist/include/necko ../dist/include/nkcache ../dist/include/nspr ../dist/include/pipboot ../dist/include/pipnss ../dist/include/pref ../dist/include/profdirserviceprovider ../dist/include/shistory ../dist/include/spellchecker ../dist/include/string ../dist/include/txtsvc ../dist/include/uconv ../dist/include/unicharutil ../dist/include/uriloader ../dist/include/view ../dist/include/webbrowserpersist ../dist/include/webbrwsr ../dist/include/webshell ../dist/include/widget ../dist/include/windowwatcher ../dist/include/xmlextras ../dist/include/xpcom ../dist/include/xpcom_obsolete ../dist/include/xpconnect ../dist/include/xultmpl ../dist/public/nss $(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon $(LOCAL_LIBRARY_DIR)/Frameworks/SharedMenusCocoa.framework/Headers
// Warning settings
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO
GCC_WARN_MISSING_PARENTHESES = NO
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_SIGN_COMPARE = YES
WARNING_FLAGS = -Wall -Wno-four-char-constants
OTHER_CPLUSPLUSFLAGS = $(OTHER_CPLUSPLUSFLAGS) -Wno-non-virtual-dtor

Просмотреть файл

@ -14,10 +14,6 @@ GCC_ENABLE_CPP_EXCEPTIONS = NO
GCC_ENABLE_CPP_RTTI = NO
// Thes warning settings should be revisited once pref panes aren't tied to core
// GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO
GCC_WARN_MISSING_PARENTHESES = NO
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_SIGN_COMPARE = YES
WARNING_CFLAGS = -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-non-virtual-dtor
WARNING_CFLAGS = -Wall -Wno-four-char-constants
OTHER_CPLUSPLUSFLAGS = $(OTHER_CPLUSPLUSFLAGS) -Wno-non-virtual-dtor

Просмотреть файл

@ -764,7 +764,6 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
NSWindow* behindWindow = nil;
// eBookmarkOpenBehavior_Preferred not specified, since it uses all the default behaviors
switch (behavior) {
case eBookmarkOpenBehavior_NewPreferred:
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL]) {
@ -794,6 +793,10 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
if (loadNewTabsInBackgroundPref)
behindWindow = [browserWindowController window];
break;
case eBookmarkOpenBehavior_Preferred:
// default, so nothing to be done.
break;
}
// we allow popups for the load that fires off a bookmark. Subsequent page loads, however, will
@ -1200,7 +1203,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
NSArray* windows = [NSApp windows];
NSEnumerator* windowEnum = [windows objectEnumerator];
NSWindow* curWindow;
while (curWindow = [windowEnum nextObject])
while ((curWindow = [windowEnum nextObject]))
[curWindow close];
}
}
@ -1513,7 +1516,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
NSEnumerator* windowEnum = [windows objectEnumerator];
NSWindow* curWindow;
while (curWindow = [windowEnum nextObject])
while ((curWindow = [windowEnum nextObject]))
if ([[curWindow windowController] isMemberOfClass:[BrowserWindowController class]])
[curWindow zoom:aSender];
}

Просмотреть файл

@ -211,7 +211,7 @@
NSMutableArray *titleArray= [NSMutableArray array];
NSString* curFilename = nil;
NSString *curPath = nil;
while (curPath = [enumerator nextObject]) {
while ((curPath = [enumerator nextObject])) {
curFilename = [curPath lastPathComponent];
// What folder we import into depends on what OmniWeb file we're importing.
if ([curFilename isEqualToString:@"Bookmarks.html"])

Просмотреть файл

@ -658,7 +658,7 @@ static BookmarkManager* gBookmarkManager = nil;
// XXX this will fire a lot of changed notifications.
NSEnumerator* bookmarksEnum = [[self rootBookmarks] objectEnumerator];
BookmarkItem* curItem;
while (curItem = [bookmarksEnum nextObject]) {
while ((curItem = [bookmarksEnum nextObject])) {
if ([curItem isKindOfClass:[Bookmark class]])
[(Bookmark*)curItem setNumberOfVisits:0];
}
@ -955,7 +955,7 @@ static BookmarkManager* gBookmarkManager = nil;
NSMutableSet* seenBookmarks = [NSMutableSet setWithCapacity:[bookmarkItems count]];
NSEnumerator* bookmarkItemsEnum = [bookmarkItems objectEnumerator];
BookmarkItem* curItem;
while (curItem = [bookmarkItemsEnum nextObject]) {
while ((curItem = [bookmarkItemsEnum nextObject])) {
if ([curItem isKindOfClass:[Bookmark class]] && ![curItem isSeparator] && ![seenBookmarks containsObject:curItem]) {
[seenBookmarks addObject:curItem]; // now we've seen it
[urlList addObject:[(Bookmark*)curItem url]];
@ -965,7 +965,7 @@ static BookmarkManager* gBookmarkManager = nil;
NSArray* children = [(BookmarkFolder*)curItem allChildBookmarks];
NSEnumerator* childrenEnum = [children objectEnumerator];
Bookmark* curChild;
while (curChild = [childrenEnum nextObject]) {
while ((curChild = [childrenEnum nextObject])) {
if (![seenBookmarks containsObject:curChild] && ![curItem isSeparator]) {
[seenBookmarks addObject:curChild]; // now we've seen it
[urlList addObject:[curChild url]];

Просмотреть файл

@ -1121,7 +1121,7 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
NSMutableArray* titleList = [NSMutableArray array];
NSEnumerator* bookmarkItemsEnum = [bookmarkItemsToCopy objectEnumerator];
BookmarkItem* curItem;
while (curItem = [bookmarkItemsEnum nextObject]) {
while ((curItem = [bookmarkItemsEnum nextObject])) {
if ([curItem isKindOfClass:[Bookmark class]]) {
[urlList addObject:[(Bookmark*)curItem url]];
[titleList addObject:[(Bookmark*)curItem title]];

Просмотреть файл

@ -217,7 +217,7 @@ static OSStatus MenuEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef
- (id)initAlternateWithTitle:(NSString *)title action:(SEL)action target:(id)target modifiers:(int)modifiers
{
if (self = [self initWithTitle:title action:action keyEquivalent:@""]) {
if ((self = [self initWithTitle:title action:action keyEquivalent:@""])) {
[self setTarget:target];
[self setKeyEquivalentModifierMask:modifiers];
[self setAlternate:YES];

Просмотреть файл

@ -571,7 +571,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
NSMutableArray* urlList = [NSMutableArray array];
NSEnumerator* historyItemsEnum = [historyItemsToCopy objectEnumerator];
HistoryItem* curItem;
while (curItem = [historyItemsEnum nextObject])
while ((curItem = [historyItemsEnum nextObject]))
{
if ([curItem isKindOfClass:[HistorySiteItem class]]) {
[urlList addObject:[(HistorySiteItem*)curItem url]];