In file included from /usr/include/string.h:535,
from /home/keengo/project/xquic/src/common/xqc_common.h:8,
from /home/keengo/project/xquic/src/tls/xqc_tls_defs.h:9,
from /home/keengo/project/xquic/src/tls/xqc_tls.h:11,
from /home/keengo/project/xquic/src/tls/xqc_tls.c:5:
In function ‘strncpy’,
inlined from ‘xqc_tls_set_alpn’ at /home/keengo/project/xquic/src/tls/xqc_tls.c:171:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/keengo/project/xquic/src/tls/xqc_tls.c: In function ‘xqc_tls_set_alpn’:
/home/keengo/project/xquic/src/tls/xqc_tls.c:151:23: note: length computed here
151 | size_t alpn_len = strlen(alpn);
| ^~~~~~~~~~~~
修改CMakeLists.txt去掉 -Werror 编译通过
Linux ubuntu22 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux```
### Steps To Reproduce
无
### Relevant log output
_No response_
What happened?
修改CMakeLists.txt去掉 -Werror 编译通过