Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/net: avoid warning in log_if_name()
Newer GCC was issuing the following warning for the call of strncpy() in log_if_name(): /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ The warning is not proper because the code is already handling string trucations. This commit disable -Wstringop-truncation for that single call of strncpy() using #pragma.
- Loading branch information