avoid compiler warning

This commit is contained in:
Richard Frith-Macdonald 2020-12-03 12:48:22 -05:00
parent 8141fe03f7
commit facfbad126
2 changed files with 2 additions and 2 deletions

View file

@ -111,7 +111,7 @@ typeSize(const char* type)
}
size = strlen(type);
objctype = (char *)NSZoneMalloc([self zone], size + 1);
strncpy(objctype, type, size);
memcpy(objctype, type, size);
objctype[size] = '\0';
}
return self;

View file

@ -117,9 +117,9 @@
- (void) _performActivity
{
# if __has_feature(blocks)
NSProcessInfo *pinfo = [NSProcessInfo processInfo];
# if __has_feature(blocks)
[pinfo performActivityWithOptions: _opts
reason: _reason
usingBlock: ^{