mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 01:01:03 +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
|
@ -481,10 +481,13 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
}
|
||||
else
|
||||
{
|
||||
int len;
|
||||
char *tmp;
|
||||
|
||||
tmp = NSZoneMalloc(NSDefaultMallocZone(), strlen(newstr)+1);
|
||||
strcpy(tmp, newstr);
|
||||
len = strlen(newstr);
|
||||
tmp = NSZoneMalloc(NSDefaultMallocZone(), len + 1);
|
||||
strncpy(tmp, newstr, len);
|
||||
tmp[len] = '\0';
|
||||
_set_arg(self, index, tmp);
|
||||
}
|
||||
if (oldstr != 0)
|
||||
|
@ -615,9 +618,12 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
if (str != 0)
|
||||
{
|
||||
char *tmp;
|
||||
int len;
|
||||
|
||||
tmp = NSZoneMalloc(NSDefaultMallocZone(), strlen(str)+1);
|
||||
strcpy(tmp, str);
|
||||
len = strlen(str);
|
||||
tmp = NSZoneMalloc(NSDefaultMallocZone(), len + 1);
|
||||
strncpy(tmp, str, len);
|
||||
tmp[len] = '\0';
|
||||
_set_arg(self, i-1, &tmp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue