Re: [PATCH] selftests/powerpc: Fix compiling error on tlbie_test due to newer gcc
On Thu, 2019-10-03 at 21:10:10 UTC, "Desnes A. Nunes do Rosario" wrote: > Newer versions of GCC demand that the size of the string to be copied must > be explicitly smaller than the size of the destination. Thus, the NULL > char has to be taken into account on strncpy. > > This will avoid the following compiling error: > > tlbie_test.c: In function 'main': > tlbie_test.c:639:4: error: 'strncpy' specified bound 100 equals destination > size [-Werror=stringop-truncation] > strncpy(logdir, optarg, LOGDIR_NAME_SIZE); > ^ > cc1: all warnings being treated as errors > > Signed-off-by: Desnes A. Nunes do Rosario Reapplied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/5b216ea1c40cf06eead15054c70e238c9bd4729e cheers
Re: [PATCH] selftests/powerpc: Fix compiling error on tlbie_test due to newer gcc
On Thu, 2019-10-03 at 21:10:10 UTC, "Desnes A. Nunes do Rosario" wrote: > Newer versions of GCC demand that the size of the string to be copied must > be explicitly smaller than the size of the destination. Thus, the NULL > char has to be taken into account on strncpy. > > This will avoid the following compiling error: > > tlbie_test.c: In function 'main': > tlbie_test.c:639:4: error: 'strncpy' specified bound 100 equals destination > size [-Werror=stringop-truncation] > strncpy(logdir, optarg, LOGDIR_NAME_SIZE); > ^ > cc1: all warnings being treated as errors > > Signed-off-by: Desnes A. Nunes do Rosario Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/3439595d5b85f0af565f5a58e495d885537fb227 cheers