Getting a [-Wstringop-truncation] warning in Walker.xs
waterkip opened this issue · 0 comments
waterkip commented
I'm running a dzil test on Debian testing with gcc 8.3.0 and I get the following warning:
./xs/Walker.xs: In function ‘XS_Git__Raw__Walker_push_range’:
./xs/Walker.xs:135:4: warning: ‘strncpy’ output truncated before terminating nul copying 2 bytes from a string of the same length [-Wstringop-truncation]
strncpy(range + GIT_OID_HEXSZ, "..", 2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~