mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +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
695c2d279c
commit
96e48988fc
23 changed files with 271 additions and 167 deletions
|
@ -55,7 +55,7 @@ static NSString *input(char **ptr)
|
|||
{
|
||||
if (*tmp == '\'')
|
||||
{
|
||||
strcpy(&tmp[-1], tmp);
|
||||
memmove(&tmp[-1], tmp, strlen(tmp) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -68,7 +68,8 @@ loc_read_file(const char *dir, const char *file)
|
|||
}
|
||||
if ((s = strstr(buf, "ocale for")) != NULL)
|
||||
{
|
||||
strcpy(country, s+10);
|
||||
strncpy(country, s + 10, sizeof(country) - 1);
|
||||
country[sizeof(country) - 1] = '\0';
|
||||
s = strchr(country, '\n');
|
||||
if (s)
|
||||
*s = '\0';
|
||||
|
@ -77,10 +78,11 @@ loc_read_file(const char *dir, const char *file)
|
|||
break;
|
||||
}
|
||||
|
||||
strcpy(locale, file);
|
||||
strncpy(locale, file, sizeof(locale) - 1);
|
||||
locale[sizeof(locale) - 1] = '\0';
|
||||
if (strlen(country) > 0 && strcmp(country, language) != 0)
|
||||
{
|
||||
strcat(country, language);
|
||||
strncat(country, language, sizeof(country) - 1 - strlen(country));
|
||||
[dict setObject: [NSString stringWithUTF8String: country]
|
||||
forKey: [NSString stringWithUTF8String: locale]];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue