snabb
snabb copied to clipboard
gcc 8.3.1 has a compile error due to the warning -Wstringop-truncation
in file apps/vhost/vhost_user.c, line 36 and 57, the following is the code:
strncpy(un.sun_path, path, sizeof(un.sun_path));
could someone change the strncpy to memcpy to avoid the compile error or add some gcc pragmas, like:
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-truncation" strncpy(d, s, 32); #pragma GCC diagnostic pop
Thanks for reporting! Could you make this a pull request with a fix please, since you know the solution, and we can merge it?