mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
Cygwin: avoid GCC 8.3 errors with -Werror=stringop-truncation
This commit is contained in:
parent
f0cf44dc7d
commit
b66dddb56d
@ -644,7 +644,7 @@ _addenv (const char *name, const char *value, int overwrite)
|
||||
return -1; /* Oops. No more memory. */
|
||||
|
||||
/* Put name '=' value into current slot. */
|
||||
strncpy (envhere, name, namelen);
|
||||
memcpy (envhere, name, namelen);
|
||||
envhere[namelen] = '=';
|
||||
strcpy (envhere + namelen + 1, value);
|
||||
}
|
||||
|
@ -24,11 +24,11 @@ struct utmp
|
||||
{
|
||||
short ut_type;
|
||||
pid_t ut_pid;
|
||||
char ut_line[UT_LINESIZE];
|
||||
char ut_line[UT_LINESIZE] __attribute__ ((nonstring));
|
||||
char ut_id[UT_IDLEN];
|
||||
time_t ut_time;
|
||||
char ut_user[UT_NAMESIZE];
|
||||
char ut_host[UT_HOSTSIZE];
|
||||
char ut_user[UT_NAMESIZE] __attribute__ ((nonstring));
|
||||
char ut_host[UT_HOSTSIZE] __attribute__ ((nonstring));
|
||||
long ut_addr;
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,7 @@ uname_x (struct utsname *name)
|
||||
{
|
||||
__try
|
||||
{
|
||||
char buf[NI_MAXHOST + 1];
|
||||
char buf[NI_MAXHOST + 1] __attribute__ ((nonstring));
|
||||
char *snp = strstr (cygwin_version.dll_build_date, "SNP");
|
||||
|
||||
memset (name, 0, sizeof (*name));
|
||||
|
Loading…
x
Reference in New Issue
Block a user