Re: [PATCH] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-11-20 Thread David Gibson
On Wed, Nov 20, 2019 at 10:31:48AM +, Peter Maydell wrote: > On Wed, 20 Nov 2019 at 05:27, David Gibson > wrote: > > > > On Mon, Oct 14, 2019 at 01:51:39PM +0100, Peter Maydell wrote: > > > If we assert() that num_cpu is always <= EXYNOS4210_NCPUS > > > is that sufficient to clue gcc in that

Re: [PATCH] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-11-20 Thread Peter Maydell
On Wed, 20 Nov 2019 at 05:27, David Gibson wrote: > > On Mon, Oct 14, 2019 at 01:51:39PM +0100, Peter Maydell wrote: > > If we assert() that num_cpu is always <= EXYNOS4210_NCPUS > > is that sufficient to clue gcc in that the buffer can't overflow? > > Interestingly, assert(s->num_cpu <= EXYNOS$21

Re: [PATCH] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-11-19 Thread David Gibson
On Mon, Oct 14, 2019 at 01:51:39PM +0100, Peter Maydell wrote: > On Fri, 4 Oct 2019 at 04:10, David Gibson wrote: > > > > exynos4210_gic_realize() prints the number of cpus into some temporary > > buffers, but it only allows 3 bytes space for it. That's plenty - I'm > > pretty sure that existing

Re: [PATCH] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-10-14 Thread Peter Maydell
On Fri, 4 Oct 2019 at 04:10, David Gibson wrote: > > exynos4210_gic_realize() prints the number of cpus into some temporary > buffers, but it only allows 3 bytes space for it. That's plenty - I'm > pretty sure that existing machines will only ever set this value to 2 > (EXYNOS4210_NCPUS). But th

Re: [PATCH] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-10-04 Thread Philippe Mathieu-Daudé
On 10/4/19 4:55 AM, David Gibson wrote: exynos4210_gic_realize() prints the number of cpus into some temporary buffers, but it only allows 3 bytes space for it. That's plenty - I'm pretty sure that existing machines will only ever set this value to 2 (EXYNOS4210_NCPUS). But the compiler can't r

[PATCH] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-10-03 Thread David Gibson
exynos4210_gic_realize() prints the number of cpus into some temporary buffers, but it only allows 3 bytes space for it. That's plenty - I'm pretty sure that existing machines will only ever set this value to 2 (EXYNOS4210_NCPUS). But the compiler can't really be expected to figure that out. Som