зеркало из https://github.com/mozilla/pjs.git
Camino only - Bug 390819: Enable -Wall for all targets, fix resulting new warnings. r/sr=mento
This commit is contained in:
Родитель
faedf5b386
Коммит
4a23ff532f
|
@ -1006,7 +1006,7 @@ PR_STATIC_CALLBACK(int) compareValues(nsICookie* aCookie1, nsICookie* aCookie2,
|
||||||
//
|
//
|
||||||
NSEnumerator *theEnum = [indexToRemove reverseObjectEnumerator];
|
NSEnumerator *theEnum = [indexToRemove reverseObjectEnumerator];
|
||||||
NSNumber *currentItem;
|
NSNumber *currentItem;
|
||||||
while (currentItem = [theEnum nextObject])
|
while ((currentItem = [theEnum nextObject]))
|
||||||
mCachedPermissions->RemoveObjectAt([currentItem intValue]);
|
mCachedPermissions->RemoveObjectAt([currentItem intValue]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1031,7 +1031,7 @@ PR_STATIC_CALLBACK(int) compareValues(nsICookie* aCookie1, nsICookie* aCookie2,
|
||||||
//
|
//
|
||||||
NSEnumerator *theEnum = [indexToRemove reverseObjectEnumerator];
|
NSEnumerator *theEnum = [indexToRemove reverseObjectEnumerator];
|
||||||
NSNumber *currentItem;
|
NSNumber *currentItem;
|
||||||
while (currentItem = [theEnum nextObject])
|
while ((currentItem = [theEnum nextObject]))
|
||||||
mCachedCookies->RemoveObjectAt([currentItem intValue]);
|
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
|
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
|
// 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
|
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
|
GCC_ENABLE_CPP_RTTI = NO
|
||||||
|
|
||||||
// Thes warning settings should be revisited once pref panes aren't tied to core
|
// 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
|
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;
|
NSWindow* behindWindow = nil;
|
||||||
|
|
||||||
// eBookmarkOpenBehavior_Preferred not specified, since it uses all the default behaviors
|
|
||||||
switch (behavior) {
|
switch (behavior) {
|
||||||
case eBookmarkOpenBehavior_NewPreferred:
|
case eBookmarkOpenBehavior_NewPreferred:
|
||||||
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL]) {
|
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL]) {
|
||||||
|
@ -794,6 +793,10 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
|
||||||
if (loadNewTabsInBackgroundPref)
|
if (loadNewTabsInBackgroundPref)
|
||||||
behindWindow = [browserWindowController window];
|
behindWindow = [browserWindowController window];
|
||||||
break;
|
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
|
// 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];
|
NSArray* windows = [NSApp windows];
|
||||||
NSEnumerator* windowEnum = [windows objectEnumerator];
|
NSEnumerator* windowEnum = [windows objectEnumerator];
|
||||||
NSWindow* curWindow;
|
NSWindow* curWindow;
|
||||||
while (curWindow = [windowEnum nextObject])
|
while ((curWindow = [windowEnum nextObject]))
|
||||||
[curWindow close];
|
[curWindow close];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1513,7 +1516,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
|
||||||
NSEnumerator* windowEnum = [windows objectEnumerator];
|
NSEnumerator* windowEnum = [windows objectEnumerator];
|
||||||
NSWindow* curWindow;
|
NSWindow* curWindow;
|
||||||
|
|
||||||
while (curWindow = [windowEnum nextObject])
|
while ((curWindow = [windowEnum nextObject]))
|
||||||
if ([[curWindow windowController] isMemberOfClass:[BrowserWindowController class]])
|
if ([[curWindow windowController] isMemberOfClass:[BrowserWindowController class]])
|
||||||
[curWindow zoom:aSender];
|
[curWindow zoom:aSender];
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,7 @@
|
||||||
NSMutableArray *titleArray= [NSMutableArray array];
|
NSMutableArray *titleArray= [NSMutableArray array];
|
||||||
NSString* curFilename = nil;
|
NSString* curFilename = nil;
|
||||||
NSString *curPath = nil;
|
NSString *curPath = nil;
|
||||||
while (curPath = [enumerator nextObject]) {
|
while ((curPath = [enumerator nextObject])) {
|
||||||
curFilename = [curPath lastPathComponent];
|
curFilename = [curPath lastPathComponent];
|
||||||
// What folder we import into depends on what OmniWeb file we're importing.
|
// What folder we import into depends on what OmniWeb file we're importing.
|
||||||
if ([curFilename isEqualToString:@"Bookmarks.html"])
|
if ([curFilename isEqualToString:@"Bookmarks.html"])
|
||||||
|
|
|
@ -658,7 +658,7 @@ static BookmarkManager* gBookmarkManager = nil;
|
||||||
// XXX this will fire a lot of changed notifications.
|
// XXX this will fire a lot of changed notifications.
|
||||||
NSEnumerator* bookmarksEnum = [[self rootBookmarks] objectEnumerator];
|
NSEnumerator* bookmarksEnum = [[self rootBookmarks] objectEnumerator];
|
||||||
BookmarkItem* curItem;
|
BookmarkItem* curItem;
|
||||||
while (curItem = [bookmarksEnum nextObject]) {
|
while ((curItem = [bookmarksEnum nextObject])) {
|
||||||
if ([curItem isKindOfClass:[Bookmark class]])
|
if ([curItem isKindOfClass:[Bookmark class]])
|
||||||
[(Bookmark*)curItem setNumberOfVisits:0];
|
[(Bookmark*)curItem setNumberOfVisits:0];
|
||||||
}
|
}
|
||||||
|
@ -955,7 +955,7 @@ static BookmarkManager* gBookmarkManager = nil;
|
||||||
NSMutableSet* seenBookmarks = [NSMutableSet setWithCapacity:[bookmarkItems count]];
|
NSMutableSet* seenBookmarks = [NSMutableSet setWithCapacity:[bookmarkItems count]];
|
||||||
NSEnumerator* bookmarkItemsEnum = [bookmarkItems objectEnumerator];
|
NSEnumerator* bookmarkItemsEnum = [bookmarkItems objectEnumerator];
|
||||||
BookmarkItem* curItem;
|
BookmarkItem* curItem;
|
||||||
while (curItem = [bookmarkItemsEnum nextObject]) {
|
while ((curItem = [bookmarkItemsEnum nextObject])) {
|
||||||
if ([curItem isKindOfClass:[Bookmark class]] && ![curItem isSeparator] && ![seenBookmarks containsObject:curItem]) {
|
if ([curItem isKindOfClass:[Bookmark class]] && ![curItem isSeparator] && ![seenBookmarks containsObject:curItem]) {
|
||||||
[seenBookmarks addObject:curItem]; // now we've seen it
|
[seenBookmarks addObject:curItem]; // now we've seen it
|
||||||
[urlList addObject:[(Bookmark*)curItem url]];
|
[urlList addObject:[(Bookmark*)curItem url]];
|
||||||
|
@ -965,7 +965,7 @@ static BookmarkManager* gBookmarkManager = nil;
|
||||||
NSArray* children = [(BookmarkFolder*)curItem allChildBookmarks];
|
NSArray* children = [(BookmarkFolder*)curItem allChildBookmarks];
|
||||||
NSEnumerator* childrenEnum = [children objectEnumerator];
|
NSEnumerator* childrenEnum = [children objectEnumerator];
|
||||||
Bookmark* curChild;
|
Bookmark* curChild;
|
||||||
while (curChild = [childrenEnum nextObject]) {
|
while ((curChild = [childrenEnum nextObject])) {
|
||||||
if (![seenBookmarks containsObject:curChild] && ![curItem isSeparator]) {
|
if (![seenBookmarks containsObject:curChild] && ![curItem isSeparator]) {
|
||||||
[seenBookmarks addObject:curChild]; // now we've seen it
|
[seenBookmarks addObject:curChild]; // now we've seen it
|
||||||
[urlList addObject:[curChild url]];
|
[urlList addObject:[curChild url]];
|
||||||
|
|
|
@ -1121,7 +1121,7 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
|
||||||
NSMutableArray* titleList = [NSMutableArray array];
|
NSMutableArray* titleList = [NSMutableArray array];
|
||||||
NSEnumerator* bookmarkItemsEnum = [bookmarkItemsToCopy objectEnumerator];
|
NSEnumerator* bookmarkItemsEnum = [bookmarkItemsToCopy objectEnumerator];
|
||||||
BookmarkItem* curItem;
|
BookmarkItem* curItem;
|
||||||
while (curItem = [bookmarkItemsEnum nextObject]) {
|
while ((curItem = [bookmarkItemsEnum nextObject])) {
|
||||||
if ([curItem isKindOfClass:[Bookmark class]]) {
|
if ([curItem isKindOfClass:[Bookmark class]]) {
|
||||||
[urlList addObject:[(Bookmark*)curItem url]];
|
[urlList addObject:[(Bookmark*)curItem url]];
|
||||||
[titleList addObject:[(Bookmark*)curItem title]];
|
[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
|
- (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 setTarget:target];
|
||||||
[self setKeyEquivalentModifierMask:modifiers];
|
[self setKeyEquivalentModifierMask:modifiers];
|
||||||
[self setAlternate:YES];
|
[self setAlternate:YES];
|
||||||
|
|
|
@ -571,7 +571,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
|
||||||
NSMutableArray* urlList = [NSMutableArray array];
|
NSMutableArray* urlList = [NSMutableArray array];
|
||||||
NSEnumerator* historyItemsEnum = [historyItemsToCopy objectEnumerator];
|
NSEnumerator* historyItemsEnum = [historyItemsToCopy objectEnumerator];
|
||||||
HistoryItem* curItem;
|
HistoryItem* curItem;
|
||||||
while (curItem = [historyItemsEnum nextObject])
|
while ((curItem = [historyItemsEnum nextObject]))
|
||||||
{
|
{
|
||||||
if ([curItem isKindOfClass:[HistorySiteItem class]]) {
|
if ([curItem isKindOfClass:[HistorySiteItem class]]) {
|
||||||
[urlList addObject:[(HistorySiteItem*)curItem url]];
|
[urlList addObject:[(HistorySiteItem*)curItem url]];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче