Fix warnigns reported by clang.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32814 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-04-08 23:21:55 +00:00
parent 2c78eae8da
commit 924b24dde4
5 changed files with 18 additions and 8 deletions

View file

@ -1,3 +1,13 @@
2011-04-09 Fred Kiefer <FredKiefer@gmx.de>
* Source/tiff.m,
* Source/NSLayoutManager.m: Replace objc_free and objc_realloc
with free and realloc.
* Source/NSToolbar.m [-_build]: Correct type cast.
* Source/GSTextFinder.m [-performFindPanelAction:withTextView:]:
Use correct format for NSInteger.
Fixes warnings reported by clang.
2011-04-08 Nicola Pero <nicola.pero@meta-innovation.com>
* GNUmakefile (SUBPROJECTS): Added Tests, so that 'make check'

View file

@ -200,7 +200,7 @@ static GSTextFinder *sharedTextFinder;
break;
default:
NSLog(@"Unknown find panel action (%u)", [sender tag]);
NSLog(@"Unknown find panel action (%ld)", (long)[sender tag]);
}
}

View file

@ -434,7 +434,7 @@ container? necessary? */
if (num_rects == rect_array_size)
{
rect_array_size += 4;
rect_array = objc_realloc(rect_array, sizeof(NSRect) * rect_array_size);
rect_array = realloc(rect_array, sizeof(NSRect) * rect_array_size);
}
rect_array[num_rects++] = r;
}
@ -2476,12 +2476,12 @@ this file describes this.
}
if (lf->points)
{
objc_free(lf->points);
free(lf->points);
lf->points = NULL;
}
if (lf->attachments)
{
objc_free(lf->attachments);
free(lf->attachments);
lf->attachments = NULL;
}
}
@ -2596,12 +2596,12 @@ no_soft_invalidation:
{
if (lf->points)
{
objc_free(lf->points);
free(lf->points);
lf->points = NULL;
}
if (lf->attachments)
{
objc_free(lf->attachments);
free(lf->attachments);
lf->attachments = NULL;
}
}

View file

@ -911,7 +911,7 @@ static GSValidationCenter *vc = nil;
displayMode = (NSToolbarDisplayMode)[[config objectForKey: @"displayMode"] intValue];
[self setDisplayMode: displayMode];
sizeMode = (NSToolbarDisplayMode)[[config objectForKey: @"sizeMode"] intValue];
sizeMode = (NSToolbarSizeMode)[[config objectForKey: @"sizeMode"] intValue];
[self setSizeMode: sizeMode];
}

View file

@ -125,7 +125,7 @@ TiffHandleWrite(thandle_t handle, tdata_t buf, tsize_t count)
if (chand->position + count > chand->size)
{
chand->size = chand->position + count + 1;
chand->data = objc_realloc(chand->data, chand->size);
chand->data = realloc(chand->data, chand->size);
*(chand->outdata) = chand->data;
if (chand->data == NULL)
return 0;