1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.6 into 10.11

This commit is contained in:
Marko Mäkelä
2024-08-14 11:36:52 +03:00
71 changed files with 2273 additions and 274 deletions

View File

@@ -255,9 +255,20 @@ static inline void safe_strcpy(char *dst, size_t dst_size, const char *src)
*
* 2) IF there is no 0 byte in the first dst_size bytes of src, strncpy will
* copy dst_size bytes, and the final byte won't be 0.
*
* In GCC 8+, the `-Wstringop-truncation` warning may object to strncpy()
* being used in this way, so we need to disable this warning for this
* single statement.
*/
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
strncpy(dst, src, dst_size);
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
dst[dst_size - 1]= 0;
}