[SLOF] [PATCH v2.1] romfs/tools: Silence more compiler warnings with GCC 8.1

Alexey Kardashevskiy aik at ozlabs.ru
Tue Jul 24 17:02:49 AEST 2018



On 23/07/2018 23:19, Thomas Huth wrote:
> GCC 8 complains about the following usages of strncpy, too:
> 
> create_crc.c:86:3: warning: ‘strncpy’ specified bound 16 equals destination
>  size [-Wstringop-truncation]
>    strncpy(uHeader.stHeader.version, pcVersion, 16);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> create_crc.c:84:3: warning: ‘strncpy’ specified bound 16 equals destination
>  size [-Wstringop-truncation]
>    strncpy(uHeader.stHeader.version, pcVersion, 16);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Let's work around the issue by using memcpy instead.


Thanks, applied this one and the others from v2.




-- 
Alexey


More information about the SLOF mailing list