From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nTc8P-00082H-9B for mharc-grub-devel@gnu.org; Mon, 14 Mar 2022 00:16:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTc8L-00080j-3G for grub-devel@gnu.org; Mon, 14 Mar 2022 00:16:38 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:41179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTc8G-0000rN-B8 for grub-devel@gnu.org; Mon, 14 Mar 2022 00:16:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1647231387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BI6IgfEyJxRXoKokWZ/QYl9IqJVRVMTdtPStMIkCX7k=; b=V0JHiQeSoKjyQRaN/L9NMYTpbvCIxoxft8eNqF98jvMQC+on0y6fDtJ2ylnnF5pX9W3xt8 xnDCRmEYQRibIHwyKvOZE3pCVgUtpytZjBmbpIJOPlpSTTQc3QxtkNjZOJN6Ed2wWVykPY C7c36cMFglHmZCCKsIz/2KJxW4gp92I= Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01lp2059.outbound.protection.outlook.com [104.47.1.59]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-38-pfAs4sKIOBStFd_ZcruTuw-1; Mon, 14 Mar 2022 05:16:26 +0100 X-MC-Unique: pfAs4sKIOBStFd_ZcruTuw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iYpDI52yl+TxIM8VQgI8SUQmojg/cTVEqMvoz5aaVCwJa9fAyNnhmfulZios2ePJFrzIDioV+ytUSB64nR6nFMJzKXBBK2JTe5pndpaPIKbkJq0140PmrXbmgzE8BhrsuxLhvcSJRPNhLO++rdXCpI5MWkuFX1ixLDgRyXeKu8BOyPvVSKgUMjzUbEBki6rIkwK7jFc9FDdmmNh44LT+5m3C3WFDd066t16vjufoX8hb2J7FSDPYBufBne0b7iSpSKv0JRMYMMNhSaFDctplRxRgw02g9RcRRDOPTflLbzSF2JICJBRdxywNzq934VvuKJxlCEaB0tufJYZ7Z7QfRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+NpSvZwZgHb2U1YAEUGLge4eEDLcd3vnAFVO+cALCI4=; b=XRWA8zAj2jaAM33+m99zcpWWzppdI8yR2z8FhQIaKfagojNHGjikLTKqXjhyKIOqGTm7TVv/Wqs0GDdMeeHUp+qb9F8J6CNYd2arTVbRtqeWz8CRQXymdmslK+lXUW8s6FQYv/5v/9OVfcyAO5W8MGFp8XjvA3yX4KqE9SaDEoMD9ritk6RYsF8XMT2ssIF0ZLKeKRlSEES3xG9bt+JFp0/8Q3+uksTxABvQEozu8njp974JGMUi2SFRpqQrTtVenBcHPInb4NrsTwAhT2RaygYSxyfu86is0bKED2jxlh/42PeNMqCXCQCNxO+qUR4ndRSHSm77jKSr/p/1gic3/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from DU2PR04MB9081.eurprd04.prod.outlook.com (2603:10a6:10:2f0::13) by DB8PR04MB5642.eurprd04.prod.outlook.com (2603:10a6:10:a5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.28; Mon, 14 Mar 2022 04:16:24 +0000 Received: from DU2PR04MB9081.eurprd04.prod.outlook.com ([fe80::2d29:445:cc37:a97f]) by DU2PR04MB9081.eurprd04.prod.outlook.com ([fe80::2d29:445:cc37:a97f%5]) with mapi id 15.20.5061.022; Mon, 14 Mar 2022 04:16:24 +0000 Date: Mon, 14 Mar 2022 12:16:16 +0800 From: Michael Chang To: The development of GNU GRUB , Daniel Kiper Subject: Re: [PATCH 3/6] commands/i386/pc/sendkey: Fix "writing 1 byte into a region of size 0" build error Message-ID: <20220314041616.GA13957@mazu> References: <20220310233600.25910-1-daniel.kiper@oracle.com> <20220310233600.25910-4-daniel.kiper@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220310233600.25910-4-daniel.kiper@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: HK2PR03CA0063.apcprd03.prod.outlook.com (2603:1096:202:17::33) To DU2PR04MB9081.eurprd04.prod.outlook.com (2603:10a6:10:2f0::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1cd4d166-6181-42a9-a65b-08da057166ee X-MS-TrafficTypeDiagnostic: DB8PR04MB5642:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UlErd9ZxwETpCUhuNga5qaLU2hlAGHmbh05mm8G4ooUxzYOY707VeLNz2T/EVkd84qY+ChLzSJGtDgB5IVDQwEhemNj20q37AIzrzEjwQAEUwluaROGbElPAwMFLB2dTcfsbw1wbDKhYlhbZa/Ty/D2wAcTc3RbdC1EomOfrlQ5Z96jCLkKhb6ALEch9E3KnjHLHeHphqhSktl9IXr17TDnGfKI+Dp2GSH1eVs4R5GgbMa5iWECQNVDWYu/u1qgjNOU4DLbuh5UHdgYWPDCRa6tygO1VF6FnISar3SH4GFNq3eoSanij9sQYM2yNetdHmmBTPz+pUERThVDqUciGo1sS0yeMage3X1PbKxH0aGYcjIKaQL0aGN6ACC8S8rclOt6IBPrzghaS5aUHcYGf25pt8koKqjpFMEaGIrRyxd77wunCN4Wn97KUIjZma77hCEzZxhlt25aRCO6nUb+UAX9fyOx1IyAVaQJnHslfemhbEM+iweB3CbE+BSGGnRKE2RGX86hdL1K5sCLyW5rXVKlIEWBkQ/+xNZKF93Ov+YPRhwJmz2xG10WTDxwXHwIPFogeUn8Gu/JoA9mtCBBo2JISqhRj56xfnr5gtCmIr7AtN6NjxX7yVeh639sa8J+7JYOtTaUpWGtHJIa5xjuPQmSPArvIMP6asxRZzebt1DRsG3MfOgPdaP8j1kDAguBehwpndDAO5TLUxPEww4FB3TBjmdksZUtEktTY1TL188L89DHZfw0YJfUJ9lcWSmbcd49XlnTG73neOhNUJNP8f4LlyegBtVS3V2BGzgEL4lb/zfenDAYzDcWgsx1squ8A X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB9081.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(7916004)(366004)(5660300002)(8936002)(38100700002)(186003)(1076003)(6486002)(6666004)(6506007)(966005)(508600001)(9686003)(8676002)(6512007)(66556008)(66476007)(66946007)(316002)(110136005)(83380400001)(2906002)(86362001)(33656002)(33716001)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?QWsIUkNIbCXBOsak/6LCV6nmlNS90r/25mZPPOHm+cGOq0B4ayqyoORAcLe1?= =?us-ascii?Q?VT/+vKYq5FUkm58Bsdnw4VP24Ro86Tz+lbU3D8HPAMBiKxMTAqKyMHfdbPZB?= =?us-ascii?Q?PHLVo2jTsRom2iNTVKFnlwsFhvcXaEXhY8r/EwLjehV+7I0tfqV7Yf0PIGmE?= =?us-ascii?Q?yp4iJhjuUki6yeNX/htnTV5lDnux5WYQMCvf8QIKB0lUnrmpaCn5uPAeQdrx?= =?us-ascii?Q?2ReuSsKZw5atbWEAz4sKguKhiQMwolsfUAjxUNBrV4OubDWpj+47eGLzqQe8?= =?us-ascii?Q?cSZRZC5uwdLxNxE1iKyoBsomRXOE3hmLFdb8q+0dbMbMWulPX5uHsdckBwZ0?= =?us-ascii?Q?XEkzW+lafyBnYmpeuuzspiSFaFNf0nW6aN9PnYnD5DpmYZwZdlYM39gwMves?= =?us-ascii?Q?ygGuB9P5sRe8aHpBsLIsjB34QmEF3myCiO9FFsyNY20wgHr7z/9vIN4qD2y9?= =?us-ascii?Q?1QOkUEDsN5y2vmgcvHyDXplTrq3VJ0vHJyWdPdEkPE8+2zaLbyK3+ZgUyY4k?= =?us-ascii?Q?GnlP03W6336Zg4T/QoOFYolIxdxMHzfNDVvjkcY7OoeTD6PzJMGGwHWP4XST?= =?us-ascii?Q?HEyozZWr1yRxyqZfojHud3ZRTTK9W09s3Qk7IuH7O3thZ/5s9i6IZH+ndQPx?= =?us-ascii?Q?Xrv62bgr9/9TT2YyFmXy3bMos20fvHcDxO2s7VKrOaw+IWX8/0mkl6Mf9qoA?= =?us-ascii?Q?xGkF10/yHCzyv/vpp9HZQs6OIzcCgen0X0fwEfJ3aS23C+nf8GFwgjwcMOJp?= =?us-ascii?Q?oMBvJFT8SRE2oCck54T5q+Dclh2H0Qs9mC2CpOQgfU2ZRQ1S38SvGvHd8cyh?= =?us-ascii?Q?Rf7dDvZ8r1RboBMwRilFrnefQBVItUNhYHucW19sbXFvyB0Eg2GrRfny+0Zh?= =?us-ascii?Q?USqRjTDD4w+UBS1AhnTO5A673R/191WzsEBI4AJ72TlhChic3vfnym3HMHp2?= =?us-ascii?Q?R2yZpls8kmlDPILQxtMNoum1JDr6R2A8BOxW53vSoONRn8dBNO1pCpby50mI?= =?us-ascii?Q?TBv6tjCwToEW6d0/L3LJYymwciSsxo44/SBQz6H1JC0rf3bgyE+0etAuOphe?= =?us-ascii?Q?Q+FlRDUaExRKQpq8v+gEhm83RtY4/koQNamzUuFgt59yPRzfdkhql4QrGe71?= =?us-ascii?Q?l5AYKyyyZoZgA2ojXMhX36E2STNuKETmfOvo1xTrp5527OTSL+kzvEPExwQa?= =?us-ascii?Q?i81BxvdjLuNn2OwLvqNePIbL8rTblD4NjeOBvZXSeHpiAIeP3F5ckhyXhxnz?= =?us-ascii?Q?pQDIKXjA1UFFGtx6rTERk0iTX9w9WXavgxzQEbO8Eq+BiFZ4omNTwvZquMIE?= =?us-ascii?Q?HYOuQ1vfZK6Tmq11KAEuiq/JI+N0RxASMHxFknm55Hdi21S35cEasG6aaWvh?= =?us-ascii?Q?NGC8C0PFyQM211PLlmzGnYJXugtujJp6sqND3X2qvohJqn2IAupTc1eNfHtZ?= =?us-ascii?Q?B+Xcfha8VhwYOToHLN0A1N5uATJJ+6FQjEF0w5br3ZMn5rJfSIq44M8UsEGo?= =?us-ascii?Q?Jw60XC298YzYoP6zJDs9uBi0XbWLZNO9S45y?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1cd4d166-6181-42a9-a65b-08da057166ee X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB9081.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2022 04:16:24.5049 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cJzxvBx3XFckuC1O1ytjmSFgNxRMB6ATd62liJzFQTFVTsWjeDcjO8NfrkUwcKFW X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5642 Received-SPF: pass client-ip=194.104.111.102; envelope-from=mchang@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2022 04:16:38 -0000 On Fri, Mar 11, 2022 at 12:35:57AM +0100, Daniel Kiper wrote: > Latest GCC may complain in that way: >=20 > commands/i386/pc/sendkey.c: In function =E2=80=98grub_sendkey_postboot= =E2=80=99: > commands/i386/pc/sendkey.c:223:21: error: writing 1 byte into a region = of size 0 [-Werror=3Dstringop-overflow=3D] > 223 | *((char *) 0x41a) =3D 0x1e; > | ~~~~~~~~~~~~~~~~~~^~~~~~ >=20 > The volatile keyword addition helps and additionally assures us the > compiler will not optimize out fixed assignments. >=20 > Signed-off-by: Daniel Kiper > --- > grub-core/commands/i386/pc/sendkey.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/grub-core/commands/i386/pc/sendkey.c b/grub-core/commands/i3= 86/pc/sendkey.c > index 26d9acd3d..ab4bca9e9 100644 > --- a/grub-core/commands/i386/pc/sendkey.c > +++ b/grub-core/commands/i386/pc/sendkey.c > @@ -220,8 +220,8 @@ grub_sendkey_postboot (void) > =20 > *flags =3D oldflags; > =20 > - *((char *) 0x41a) =3D 0x1e; > - *((char *) 0x41c) =3D 0x1e; > + *((volatile char *) 0x41a) =3D 0x1e; > + *((volatile char *) 0x41c) =3D 0x1e; > =20 > return GRUB_ERR_NONE; > } > @@ -236,8 +236,8 @@ grub_sendkey_preboot (int noret __attribute__ ((unuse= d))) > oldflags =3D *flags; > =20 > /* Set the sendkey. */ > - *((char *) 0x41a) =3D 0x1e; > - *((char *) 0x41c) =3D keylen + 0x1e; > + *((volatile char *) 0x41a) =3D 0x1e; > + *((volatile char *) 0x41c) =3D keylen + 0x1e; > grub_memcpy ((char *) 0x41e, sendkey, 0x20); > =20 > /* Transform "any ctrl" to "right ctrl" flag. */ > --=20 > 2.11.0 Unfortunately the volatile keyword doesn't help on a more recent gcc-12 build [1]. With that -Warray-bounds warning [2] is emitted this time than -Wstringop-overflow. I believe this is caused by this gcc regression in which hardwired literal address is treated as NULL plus an offset, while there's no good way to tell that literal address being an invalid accesses at non-zero offsets to null pointers or not: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99578 Before upstream comes up with a solution or introducing new annotation for literal pointer. For the time being their recommedation is to suppress the warning with #pragma or use volatile pointer which appears to not work for gcc-12. Instead of inserting #pragma all over the places to avoid the diagnose of Warray-bounds. I think we can try to port absolute_pointer [3] and RELOC_HIDE [4] used by the linux kernel to disconnect a pointer using literal address from its original object hence gcc won't make assumptions on the boundary while doing pointer arithmetic. This sounds a better way to go as it can work across gcc versions. I am halfway in preparing the patch to wrap literal pointers in absolute_pointer. Before posting it here, I'd like to know do we have any other prefernece like just disabling it via #pragma as that sounds more like a norm? Thanks, Michael [3] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler.h#L= 180 [4] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler-gcc= .h#L31 [1] abuild@local:~> gcc --version gcc (SUSE Linux) 12.0.1 20220228 (experimental) [revision 37b583b9d7719f663= 656ce65ac822c11471fb540] Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [2] [ 195s] ../../grub-core/commands/i386/pc/sendkey.c: In function 'grub_send= key_postboot': [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:221:3: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 221 | *flags =3D oldflags; [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:223:3: error: array sub= script 0 is outside array bounds of 'volatile char[0]' [-Werror=3Darray-bou= nds] [ 195s] 223 | *((volatile char *) 0x41a) =3D 0x1e; [ 195s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:224:3: error: array sub= script 0 is outside array bounds of 'volatile char[0]' [-Werror=3Darray-bou= nds] [ 195s] 224 | *((volatile char *) 0x41c) =3D 0x1e; [ 195s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ [ 195s] ../../grub-core/term/ns8250.c: In function 'grub_ns8250_init': [ 195s] ../../grub-core/term/ns8250.c:242:26: error: array subscript 0 is = outside array bounds of 'const short unsigned int[0]' [-Werror=3Darray-boun= ds] [ 195s] 242 | if (serial_hw_io_addr[i]) [ 195s] | ~~~~~~~~~~~~~~~~~^~~ [ 195s] ../../grub-core/term/ns8250.c:262:46: error: array subscript 0 is = outside array bounds of 'const short unsigned int[0]' [-Werror=3Darray-boun= ds] [ 195s] 262 | com_ports[i].port =3D serial_hw_io_addr[i]; [ 195s] | ~~~~~~~~~~~~~~~~~^~~ [ 195s] ../../grub-core/term/ns8250.c: In function 'grub_ns8250_hw_get_por= t': [ 195s] ../../grub-core/term/ns8250.c:277:29: error: array subscript 0 is = outside array bounds of 'const short unsigned int[0]' [-Werror=3Darray-boun= ds] [ 195s] 277 | return serial_hw_io_addr[unit]; [ 195s] | ~~~~~~~~~~~~~~~~~^~~~~~ [ 195s] cc1: all warnings being treated as errors [ 195s] ../../grub-core/commands/i386/pc/sendkey.c: In function 'grub_send= key_preboot': [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:236:14: error: array su= bscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[= ]'} [-Werror=3Darray-bounds] [ 195s] 236 | oldflags =3D *flags; [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:239:3: error: array sub= script 0 is outside array bounds of 'volatile char[0]' [-Werror=3Darray-bou= nds] [ 195s] 239 | *((volatile char *) 0x41a) =3D 0x1e; [ 195s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:240:3: error: array sub= script 0 is outside array bounds of 'volatile char[0]' [-Werror=3Darray-bou= nds] [ 195s] 240 | *((volatile char *) 0x41c) =3D keylen + 0x1e; [ 195s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:244:7: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 244 | if (*flags & (1 << 8)) [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:245:5: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 245 | *flags &=3D ~(1 << 2); [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:248:7: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 248 | if (*flags & (1 << 9)) [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:249:5: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 249 | *flags &=3D ~(1 << 3); [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:251:13: error: array su= bscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[= ]'} [-Werror=3Darray-bounds] [ 195s] 251 | *flags =3D (*flags & andmask) | ormask; [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:251:3: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 251 | *flags =3D (*flags & andmask) | ormask; [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:255:5: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 255 | *flags |=3D (1 << 2); [ 195s] | ^~~~~~ [ 195s] make[3]: *** [Makefile:46365: term/serial_module-ns8250.o] Error 1 [ 195s] make[3]: *** Waiting for unfinished jobs.... [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:258:7: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 258 | if (*flags & (1 << 9)) [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:259:5: error: array sub= script 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]= '} [-Werror=3Darray-bounds] [ 195s] 259 | *flags |=3D (1 << 3); [ 195s] | ^~~~~~ [ 195s] ../../grub-core/commands/i386/pc/sendkey.c:281:27: error: array su= bscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[= ]'} [-Werror=3Darray-bounds] [ 195s] 281 | grub_outb ((*flags >> 4) & 7, 0x60); [ 195s] | ^~~~~~ [ 195s] cc1: all warnings being treated as errors Thanks, Michael >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel