Avoid warnings from gcc-16

gcc-16 adds warnings about using strncpy() to copy into a buffer with
  size equal to the max count, possibly creating an unterminated string.
  Since we don't care about the contents here and both buffers are the
  same size, just do a byte copy.
This commit is contained in:
George Baltz N3GB 2026-03-13 05:13:49 -04:00
parent 5f85cdf562
commit b6a25c8a83

View file

@ -1865,7 +1865,7 @@ readline_repeat:
// we need to copy client_version to our thread in case there are multiple client versions
// client_version is used to determine any backward compatibility requirements or problems
strncpy(client_version, rs->client_version, sizeof(client_version));
memcpy(client_version, rs->client_version, sizeof(client_version));
}