1
0
forked from aniani/vim

patch 8.0.1709: some non-C89 code may slip through

Problem:    Some non-C89 code may slip through.
Solution:   Enforce C89 in configure. Fix detected problems. (James McCoy,
            closes #2735)
This commit is contained in:
Bram Moolenaar
2018-04-14 14:37:07 +02:00
parent 78a16b0f2a
commit 2e324950b8
6 changed files with 122 additions and 12 deletions

View File

@@ -672,9 +672,9 @@ channel_open(
{
char *p;
/* When using host->h_addr directly ubsan warns for it to not be
* aligned. First copy the pointer to aviod that. */
memcpy(&p, &host->h_addr, sizeof(p));
/* When using host->h_addr_list[0] directly ubsan warns for it to not
* be aligned. First copy the pointer to avoid that. */
memcpy(&p, &host->h_addr_list[0], sizeof(p));
memcpy((char *)&server.sin_addr, p, host->h_length);
}