Remove compiler warnings from clang.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30117 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-04-10 17:48:46 +00:00
parent 750d092f4c
commit 63638ee055
16 changed files with 74 additions and 45 deletions

View file

@ -1,7 +1,26 @@
2010-04-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/linking.m
* Source/GSDisplayServer.m
* Source/NSWorkspace.m
* Source/NSButtonCell.m
* Source/NSSplitView.m
* Source/GSNibLoading.m
* Source/NSCursor.m
* Source/NSScroller.m
* Source/NSOutlineView.m
* Source/GSToolbarView.m
* Source/GSPDFPrintOperation.m
* Source/GSThemePanel.m
* Source/NSImage.m
* Source/NSTableView.m
* Source/GSDragView.m: Remove compiler warnings detected by clang
and reported by David Chisnall <theraven@gna.org>.
2010-04-09 David Ayers <ayers@fsfe.org>
* Headers/AppKit/NSSound.h: Import NSBundle.h for category declaration.
2010-04-08 Jonathan Gillaspie <jonathan.gillaspie@testplant.com>
* Source/GSToolTips.m: Prevent Windows API callback from crashing when displaying tooltips.

View file

@ -26,23 +26,24 @@
Boston, MA 02110-1301, USA.
*/
#include <Foundation/NSArray.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSEnumerator.h>
#include <Foundation/NSData.h>
#include <Foundation/NSLock.h>
#include <Foundation/NSRunLoop.h>
#include <Foundation/NSThread.h>
#include <Foundation/NSGeometry.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSData.h>
#import <Foundation/NSLock.h>
#import <Foundation/NSRunLoop.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSThread.h>
#import <Foundation/NSGeometry.h>
#include "AppKit/NSApplication.h"
#include "AppKit/NSEvent.h"
#include "AppKit/NSImage.h"
#include "AppKit/NSWindow.h"
#include "GNUstepGUI/GSDisplayServer.h"
#include "GNUstepGUI/GSDragView.h"
#import "AppKit/NSApplication.h"
#import "AppKit/NSEvent.h"
#import "AppKit/NSImage.h"
#import "AppKit/NSWindow.h"
#import "GNUstepGUI/GSDisplayServer.h"
#import "GNUstepGUI/GSDragView.h"
#include "GSSlideView.h"
#import "GSSlideView.h"
/* Display attributes */
NSString * GSDisplayName = @"DisplayName";

View file

@ -623,7 +623,7 @@ static GSDragView *sharedDragView = nil;
startPoint = [eWindow convertBaseToScreen: [theEvent locationInWindow]];
startPoint.x -= offset.width;
startPoint.y -= offset.height;
NSDebugLLog(@"NSDragging", @"Drag window origin %d %d\n", startPoint.x, startPoint.y);
NSDebugLLog(@"NSDragging", @"Drag window origin %@\n", NSStringFromPoint(startPoint));
// Notify the source that dragging has started
if ([dragSource respondsToSelector:
@ -888,7 +888,7 @@ static GSDragView *sharedDragView = nil;
dragPoint = [destWindow convertScreenToBase: dragPosition];
}
NSDebugLLog(@"NSDragging", @"mouse window %d (%x) at %@\n",
NSDebugLLog(@"NSDragging", @"mouse window %d (%@) at %@\n",
mouseWindowRef, destWindow, NSStringFromPoint(dragPosition));
//--- send exit message if necessary -------------------------------------

View file

@ -46,6 +46,7 @@
#import <Foundation/NSException.h>
#import <Foundation/NSKeyedArchiver.h>
#import <Foundation/NSObjCRuntime.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSString.h>
// FIXME: Used for NSKeyedArchiver access. All this should be moved into base.

View file

@ -33,12 +33,14 @@
*/
#include <Foundation/NSPathUtilities.h>
#include <Foundation/NSTask.h>
#include <Foundation/NSProcessInfo.h>
#include <Foundation/NSData.h>
#include "AppKit/NSView.h"
#include "GNUstepGUI/GSPDFPrintOperation.h"
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSPathUtilities.h>
#import <Foundation/NSTask.h>
#import <Foundation/NSProcessInfo.h>
#import "AppKit/NSPrintInfo.h"
#import "AppKit/NSView.h"
#import "GNUstepGUI/GSPDFPrintOperation.h"
/**

View file

@ -26,15 +26,16 @@
Boston, MA 02110-1301, USA.
*/
#include <Foundation/NSFileManager.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSPathUtilities.h>
#include <Foundation/NSUserDefaults.h>
#include "AppKit/NSButton.h"
#include "AppKit/NSMatrix.h"
#include "AppKit/NSScrollView.h"
#include "GSThemePrivate.h"
#include "GSGuiPrivate.h"
#import <Foundation/NSFileManager.h>
#import <Foundation/NSNotification.h>
#import <Foundation/NSPathUtilities.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSUserDefaults.h>
#import "AppKit/NSButton.h"
#import "AppKit/NSMatrix.h"
#import "AppKit/NSScrollView.h"
#import "GSThemePrivate.h"
#import "GSGuiPrivate.h"
@implementation GSThemePanel

View file

@ -343,7 +343,7 @@ static void initSystemExtensionsColors(void)
[(NSToolbarItem *)[[info draggingSource] toolbarItem] itemIdentifier];
if ([self _insertionIndexAtPoint: [info draggingLocation]] != NSNotFound
&& [allowedItemIdentifiers containsObject: itemIdentifier]);
&& [allowedItemIdentifiers containsObject: itemIdentifier])
{
return NSDragOperationGeneric;
}
@ -360,7 +360,7 @@ static void initSystemExtensionsColors(void)
[(NSToolbarItem *)[[info draggingSource] toolbarItem] itemIdentifier];
if ([self _insertionIndexAtPoint: [info draggingLocation]] != NSNotFound
&& [allowedItemIdentifiers containsObject: itemIdentifier]);
&& [allowedItemIdentifiers containsObject: itemIdentifier])
{
return NSDragOperationGeneric;
}

View file

@ -1550,7 +1550,7 @@ typedef struct _GSButtonCellFlags
[aCoder encodeInt: bFlags forKey: @"NSButtonFlags"];
// style and border.
bFlags2 != [self showsBorderOnlyWhileMouseInside] ? 0x8 : 0;
bFlags2 |= [self showsBorderOnlyWhileMouseInside] ? 0x8 : 0;
bFlags2 |= (([self bezelStyle] & 0x7) | (([self bezelStyle] & 0x18) << 2));
bFlags2 |= [self keyEquivalentModifierMask] << 8;
[aCoder encodeInt: bFlags2 forKey: @"NSButtonFlags2"];

View file

@ -30,6 +30,7 @@
#include <Foundation/NSArray.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSKeyedArchiver.h>
#include "AppKit/NSColor.h"

View file

@ -1897,19 +1897,19 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
{
if (repd->bg == nil)
{
NSDebugLLog(@"NSImage", @"Invalid %@ ... %@ %d",
NSDebugLLog(@"NSImage", @"Invalid %@ ... %@ %@",
repd->bg, _color, repd->rep);
invalidCache = repd;
}
else if (opaque == YES || [repd->bg isEqual: _color] == YES)
{
NSDebugLLog(@"NSImage", @"Exact %@ ... %@ %d",
NSDebugLLog(@"NSImage", @"Exact %@ ... %@ %@",
repd->bg, _color, repd->rep);
return repd;
}
else
{
NSDebugLLog(@"NSImage", @"Partial %@ ... %@ %d",
NSDebugLLog(@"NSImage", @"Partial %@ ... %@ %@",
repd->bg, _color, repd->rep);
partialCache = repd;
partialCount++;

View file

@ -39,6 +39,7 @@
#import <Foundation/NSMapTable.h>
#import <Foundation/NSNotification.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSValue.h>

View file

@ -1003,7 +1003,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
[theCell highlight: YES withFrame: rect inView: self];
[_window flushWindow];
NSDebugLog (@"tracking cell %x", theCell);
NSDebugLog (@"tracking cell %@", theCell);
/*
* The "tracking" in this method actually takes place within

View file

@ -36,6 +36,7 @@
#include <Foundation/NSCoder.h>
#include <Foundation/NSDecimalNumber.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSException.h>
#include <Foundation/NSGeometry.h>
#include <Foundation/NSNotification.h>

View file

@ -93,9 +93,9 @@ typedef struct _tableViewFlags
unsigned int emptySelection:1;
unsigned int multipleSelection:1;
unsigned int columnSelection:1;
unsigned int __unused:26;
unsigned int _unused:26;
#else
unsigned int __unused:26;
unsigned int _unused:26;
unsigned int columnSelection:1;
unsigned int multipleSelection:1;
unsigned int emptySelection:1;

View file

@ -1643,8 +1643,8 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
- (NSArray*) mountedLocalVolumePaths
{
NSMutableArray *names;
NSFileManager *mgr = [NSFileManager defaultManager];
#if defined(__MINGW32__)
NSFileManager *mgr = [NSFileManager defaultManager];
unsigned max = BUFSIZ;
unichar buf[max];
unichar *base = buf;
@ -1679,6 +1679,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
}
#elif defined(HAVE_GETMNTENT) && defined (MNT_MEMB)
NSFileManager *mgr = [NSFileManager defaultManager];
FILE *fptr = fopen("/etc/mtab", "r");
struct mntent *m;

View file

@ -1,6 +1,7 @@
#include <Foundation/Foundation.h>
#include "AppKit/AppKit.h"
#import <Foundation/Foundation.h>
#import "AppKit/AppKit.h"
#import "GNUstepGUI/GSFontInfo.h"
void __objc_gui_linking(void)
{