avoid compiler/linker warnings

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32483 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-03-07 11:34:17 +00:00
parent 695c2d279c
commit 96e48988fc
23 changed files with 271 additions and 167 deletions

View file

@ -872,6 +872,7 @@ static IMP _xRefImp; /* Serialize a crossref. */
else
{
char *tmp;
int len;
if (xref != GSIArrayCount(_ptrAry))
{
@ -879,9 +880,10 @@ static IMP _xRefImp; /* Serialize a crossref. */
format: @"extra string crossref - %d", xref];
}
(*_dDesImp)(_src, dDesSel, &tmp, @encode(char*), &_cursor, nil);
*(void**)address = GSAutoreleasedBuffer(strlen(tmp)+1);
len = strlen(tmp);
*(void**)address = GSAutoreleasedBuffer(len + 1);
GSIArrayAddItem(_ptrAry, (GSIArrayItem)*(void**)address);
strcpy(*(char**)address, tmp);
memcpy(*(char**)address, tmp, len + 1);
NSZoneFree(NSDefaultMallocZone(), tmp);
}
return;