mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
ab4587dbcf
commit
dbaa646d12
23 changed files with 271 additions and 167 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue