lkml.org 
[lkml]   [2022]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: gcc-12: build errors: arch/arm64/kernel/setup.c:225:56: warning: array subscript -1 is outside array bounds of 'char[]' [-Warray-bounds]
On Fri, Jun 3, 2022 at 4:03 AM Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
> inlined from 'setup_arch' at arch/arm64/kernel/setup.c:350:2:
> arch/arm64/kernel/setup.c:225:56: warning: array subscript -1 is
> outside array bounds of 'char[]' [-Warray-bounds]
> 225 | kernel_code.end = __pa_symbol(__init_begin - 1);
>

Is this the only warning of this type that you get for arm64?

I think the easy fix would be to reword this line to

kernel_code.end = __pa_symbol(__init_begin) - 1;


Arnd

\
 
 \ /
  Last update: 2022-06-03 09:41    [W:0.696 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site