Hi,
comment below.
~ Jo
On 8/24/22 10:14 AM, Petr Štetiar wrote:
> [...]
> --- a/sys.c
> +++ b/sys.c
> @@ -224,7 +224,8 @@ procstr:
> continue;
>
> if (!strcmp(var, "Package:")) {
> - strncpy(pkg, p1, sizeof(pkg));
> +
gcc 10 with -O2 reports following:
In function ‘strncpy’,
inlined from ‘rpc_sys_packagelist’ at
/opt/devel/openwrt/c-projects/rpcd/sys.c:244:4:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error:
‘__builtin_strncpy’ specified bound 128 equals destination size
[-Werror=st