-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: GCC8 and later gives warnings for strncpy and strncat
When we use strncpy and strncat, we have allocated one more byte for the terminal NULL character. However, the GCC after version 8 will report warnings (-Wstringop-truncation) even when we use strncpy and strncat correctly. Replace strncpy and strncat with memcpy to avoid these warnings.
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters