RE: gcc trunk fails to build kernel on PowerPC64 due to oprofile warnings

David Laight <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded,gmane.linux.oprofile
Message-ID <[email protected]>
From: Anton Blanchard
> Sent: 25 January 2017 23:01
> gcc trunk has failed to build PowerPC64 kernels for a month or so. The issue
> is in oprofile, which is common code but ends up being sucked into
> arch/powerpc and therefore subject to the -Werror applied to arch/powerpc:
...
> linux/arch/powerpc/oprofile/../../../drivers/oprofile/oprofile_stats.c:55:25: error: %d directive
> output may be truncated writing between 1 and 11 bytes into a region of size 7 [-Werror=format-
> truncation=]
>    snprintf(buf, 10, "cpu%d", i);

FFS these warnings are getting OTT.
The compiler needs to be able to track the domain of integers before applying
some of these warnings.

	David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.