Open dnaka91 opened 8 months ago
Sorry this has sat in the queue for a while. The original reason I went with strncat
instead of strcat
is because it was trigging a bunch of warnings in one of the other builds. Once I get home (currently traveling) I'll dive deeper into this, and refresh in my mind why I used strncat
in the first place, and see if there is a way to get rid of warnings both in the Arch packaging, and in the other compilers.
Sorry late reply from my side too :sweat_smile:. Just wanted to let you know that it's not high prio, because I can simply suppress that warning for the Arch packaging script.
Also, I can't really test this out on Windows, so won't know if this creates issues on other platforms. At least the CI completed without warnings so far.
When building with GCC, a warning is raised about string operation overflow for the usages of
strncat
. This doesn't happen by default, but when building on Arch Linux system, themakepkg
default configuration enables certain extra warnings.After some searching it seems that GCC warns about it because calling
strncat
with the source string length as 3rd argument is essentially the same as calling the simplerstrcat
function.