Activating (and fixing) more warnings in Xcode

svn path=/trunk/netsurf/; revision=11469
This commit is contained in:
Sven Weidauer 2011-01-23 19:32:56 +00:00
parent f9ad379830
commit dd1e7b893b
8 changed files with 17 additions and 9 deletions

View File

@ -19,6 +19,7 @@
#import "DownloadWindowController.h"
#import "desktop/download.h"
#import "desktop/gui.h"
#define UNIMPL() NSLog( @"Function '%s' unimplemented", __func__ )

View File

@ -16,7 +16,7 @@
- (id)initWithFrame:(NSRect)frameRect pullsDown:(BOOL)flag
{
if (self = [super initWithFrame:frameRect pullsDown:YES]) {
if ((self = [super initWithFrame:frameRect pullsDown:YES]) != nil) {
[self setBezelStyle:NSRegularSquareBezelStyle];
[self setBordered:NO];
[self setTitle:@""];

View File

@ -1002,7 +1002,7 @@
if (animate) {
NSMutableArray *targetFrames = [NSMutableArray arrayWithCapacity:[_cells count]];
for (NSInteger i = 0; i < [_cells count]; i++) {
for (NSUInteger i = 0; i < [_cells count]; i++) {
currentCell = [_cells objectAtIndex:i];
//we're going from NSRect -> NSValue -> NSRect -> NSValue here - oh well
@ -1024,7 +1024,7 @@
[self _animateCells:_animationTimer];
} else {
for (NSInteger i = 0; i < [_cells count]; i++) {
for (NSUInteger i = 0; i < [_cells count]; i++) {
currentCell = [_cells objectAtIndex:i];
[currentCell setFrame:[_controller cellFrameAtIndex:i]];
@ -1048,7 +1048,7 @@
if ((cellCount > 0) && [animation isAnimating]) {
//compare our target position with the current position and move towards the target
for (NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
for (NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
currentCell = [_cells objectAtIndex:i];
NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue];
CGFloat sizeChange;
@ -1084,7 +1084,7 @@
} else {
//put all the cells where they should be in their final position
if (cellCount > 0) {
for (NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
for (NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
PSMTabBarCell *currentCell = [_cells objectAtIndex:i];
NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue];
@ -2026,10 +2026,10 @@
- (NSInteger)numberOfVisibleTabs
{
NSInteger i, cellCount = 0;
NSInteger cellCount = 0;
PSMTabBarCell *nextCell;
for (i = 0; i < [_cells count]; i++) {
for (NSUInteger i = 0; i < [_cells count]; i++) {
nextCell = [_cells objectAtIndex:i];
if ([nextCell isInOverflowMenu]) {

View File

@ -5,5 +5,10 @@ OTHER_LDFLAGS =
PREBINDING = NO
HEADER_SEARCH_PATHS = ${SRCROOT}/../
GCC_C_LANGUAGE_STANDARD = gnu99
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES

View File

@ -19,6 +19,7 @@
#import <Cocoa/Cocoa.h>
#import "utils/log.h"
#import "content/fetch.h"
const char *fetch_filetype(const char *unix_path)
{

View File

@ -121,7 +121,7 @@ static NSFont *cocoa_font_get_nsfont( const plot_font_style_t *style )
return font;
}
NSDictionary *cocoa_font_attributes( const plot_font_style_t *style )
static NSDictionary *cocoa_font_attributes( const plot_font_style_t *style )
{
return [NSDictionary dictionaryWithObjectsAndKeys:
cocoa_font_get_nsfont( style ), NSFontAttributeName,

View File

@ -28,6 +28,7 @@
#import "desktop/options.h"
#import "desktop/textinput.h"
#import "desktop/selection.h"
#import "desktop/401login.h"
#import "utils/utils.h"
char *default_stylesheet_url;

View File

@ -159,7 +159,7 @@ static bool plot_polygon(const int *p, unsigned int n, const plot_style_t *pstyl
NSBezierPath *path = [NSBezierPath bezierPath];
[path moveToPoint: NSMakePoint( p[0], p[1] )];
for (int i = 1; i < n; i++) {
for (unsigned i = 1; i < n; i++) {
[path lineToPoint: NSMakePoint( p[2*i], p[2*i+1] )];
}
[path closePath];