Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jHJG4-0003W6-85 for mharc-grub-devel@gnu.org; Wed, 25 Mar 2020 23:32:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60060) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHJFz-0003Vf-NL for grub-devel@gnu.org; Wed, 25 Mar 2020 23:32:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHJFw-0002BU-8I for grub-devel@gnu.org; Wed, 25 Mar 2020 23:32:34 -0400 Received: from m4a0073g.houston.softwaregrp.com ([15.124.2.131]:52842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jHJFw-0002Ai-0t for grub-devel@gnu.org; Wed, 25 Mar 2020 23:32:32 -0400 Received: FROM m4a0073g.houston.softwaregrp.com (15.120.17.147) BY m4a0073g.houston.softwaregrp.com WITH ESMTP; Thu, 26 Mar 2020 03:29:55 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 26 Mar 2020 03:29:48 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (15.124.8.13) by M4W0334.microfocus.com (15.120.17.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Thu, 26 Mar 2020 03:29:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cLoifbIGZ/MSO451SI1HV1yiI9hKxWEGqH4QAuJs5aEOL/bTzWfhCqCiaf2Rk+tTupG8hONWSMqp0nvtZyDbMZY+HTglY9Bbjqj1hv+RWqroGxAOUtYWyNDswki6fhNa7Nw39NNN+snxj2wAwHr5IEzu/NizFH90/TX0ZKqR9loU6uRUb12UIwSSJv61KARCJXZATIFAVyH0eEUVcJp6hTo13g2VB4jDtqWAcv66kXLJkBO0Vy9i0jyeFoaJieAMoCcx6lX2mkgaB0BRlF9JwRotxN+wZ3dYkrnlEEru8LQ9BVatlBhO2itMIcY7QphMfUNrZdm+oZxL4e05VMRQ1Q== 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-SenderADCheck; bh=EQiDfSa/erVJZTGYJr41CYf0fIM3JVtm853J7isW+gw=; b=i2/Aiti34f4jhveXgjFdxfEn6EvnJXco2LOweHzbqlFkhDuoQ5OXBoNzOF/5y9Kmqx9UPG53msrmaQXp6HaBVj0a4z7+7sf6JqAn1SSy3ii00PQzLfIivT7ZFkn1Ycpzb0COSi0IZgpOXRgMuOvzpdOjjpSf7Wguv4LRUAGC89W08ZXB9RxaIBDXJbzTOJKGU7TLr9VwRqFaNAOqgqHn7DEOrFDNBdT38tQ/T5RXslv7jdzBQmyfBd5JsaNngh7YP7kyR6aex/aCzST9HBzy960LX02IUcvdgtbmuMgpCkU8r8bMazuuxRE+p1nx0CHupwdm42XVyfii41EkfM84Zg== 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: spf=none (sender IP is ) smtp.mailfrom=MChang@suse.com; Received: from BY5PR18MB3140.namprd18.prod.outlook.com (2603:10b6:a03:1a1::17) by BY5PR18MB3361.namprd18.prod.outlook.com (2603:10b6:a03:1ab::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19; Thu, 26 Mar 2020 03:29:46 +0000 Received: from BY5PR18MB3140.namprd18.prod.outlook.com ([fe80::a404:f256:fbe8:c2d]) by BY5PR18MB3140.namprd18.prod.outlook.com ([fe80::a404:f256:fbe8:c2d%4]) with mapi id 15.20.2856.019; Thu, 26 Mar 2020 03:29:46 +0000 Date: Thu, 26 Mar 2020 11:29:39 +0800 From: Michael Chang To: PGNet Dev CC: The development of GNU GRUB , Subject: Re: disk/mdraid1x_linux.c:181:15: warning: array subscript ... Message-ID: <20200326032939.GB4258@mercury> References: <9634719282783168194@scdbackup.webframe.org> <20200325072728.GA13446@mercury> <4529f884-f8d0-1cf5-0331-0c76d1b5e4bc@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <4529f884-f8d0-1cf5-0331-0c76d1b5e4bc@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: DM5PR07CA0061.namprd07.prod.outlook.com (2603:10b6:4:ad::26) To BY5PR18MB3140.namprd18.prod.outlook.com (2603:10b6:a03:1a1::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mercury (36.226.146.226) by DM5PR07CA0061.namprd07.prod.outlook.com (2603:10b6:4:ad::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.21 via Frontend Transport; Thu, 26 Mar 2020 03:29:44 +0000 X-Originating-IP: [36.226.146.226] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59f333d9-c3b2-46df-a6f8-08d7d135ee5d X-MS-TrafficTypeDiagnostic: BY5PR18MB3361: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0354B4BED2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4636009)(346002)(376002)(366004)(136003)(396003)(39860400002)(6496006)(52116002)(53546011)(9686003)(66946007)(2906002)(1076003)(66556008)(66476007)(33716001)(4326008)(5660300002)(6916009)(55016002)(26005)(956004)(9576002)(16526019)(478600001)(81166006)(81156014)(6666004)(186003)(86362001)(8676002)(8936002)(316002)(33656002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3361; H:BY5PR18MB3140.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: suse.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mIIeRjuVWtphEfhYKAcpV/Ufx+Xp0UVumjz3UbPeedqO6H+4vL+vMxxi9ndYlhQN30it7YMLHmvsmgn87Axua2cvwTqLU12tU86kTycQjrEl8/dtjU8ecA5iAk866T1p8S2ZsZFcCZuG5WQRB77PUqI/QVRx91uCSjxQqPb0ri1nG/rxfxttXwFW3V3+mQ5tez1zXs5RqoGW3iIXGkWWu7Jqe4bE2tdgnIC9n1Kqu4lofaMxv2z9ol9la5sPqmKF7USfiIQ92cECWz528/TLiJWiVLlP9LhpVhMUv6i1eYIZ5cArA+t08yALFtF3DgjNQGgmk34HLBBJJHugP3zipFzIaC8lZXbuZ1VQN3kd5xQwNrono9z4mwPWw30D9todHSPMgvLYissuEUqTJ5KqAIqG5G4ayJzIeQR6hZsd68GNLvRaVHmHbat0v5MrejFV X-MS-Exchange-AntiSpam-MessageData: MEygDP1cufKWOGREHEqZnxSCTDaoeRfZsnPquwMlBXGLUdPJB9Qi54kxoo7qlp9r/PzrubOPuVb57nB15/63oRwUPQ2NQfvTDsB1M5pWBFagi/XU6Vps9sCm65UdQxsTj5T+M3xNulotOgMHAzsL0A== X-MS-Exchange-CrossTenant-Network-Message-Id: 59f333d9-c3b2-46df-a6f8-08d7d135ee5d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2020 03:29:46.3818 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lHhkYUz+dIwyfp+xfCwsqEyck4cf2US5ROE7SG1xRZDASJnfhpG5+5bQObQ/2qrK X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3361 X-OriginatorOrg: suse.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 15.124.2.131 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 03:32:37 -0000 On Wed, Mar 25, 2020 at 08:35:58AM -0700, PGNet Dev wrote: > On 3/25/20 12:27 AM, Michael Chang wrote: > > It would be great if you can help to test patch to solve the build > > problem for gcc-10 in your system or not. >=20 > with your patches, no immediate mdraid1x or zfs build errors Thanks a lot for your test and validation. > one does surface, now, for ntfscomp ... I am also using openSUSE, somehow I didn't have the ntfscomp build error on my gcc-10 build test. :( Would you mind to start a new thread for it ? Thanks, Michael >=20 > gcc --version > gcc (SUSE Linux) 10.0.1 20200320 (experimental) [revision 7d4549b2cd209e= b621453ce13be7ffd84ffa720a] >=20 > cd grub > git log -n1 > 1 commit 552c9fd08122a3036c724ce96dfe68aa2f75705f (HEAD -> master, = origin/master, origin/HEAD) > 2 Author: Patrick Steinhardt > 3 Date: Sat Mar 7 17:29:09 2020 +0100 >=20 > patch -p1 < /tmp/grub_patches/0001-mdraid1x_linux-Fix-gcc10-error-Werror-= array-bounds.patch > patching file grub-core/disk/mdraid1x_linux.c > patch -p1 < /tmp/grub_patches/0002-zfs-Fix-gcc10-error-Werror-zero-length= -bounds.patch > patching file grub-core/fs/zfs/zfs.c > patching file include/grub/zfs/zap_leaf.h >=20 > unset CC CPP > ./bootstrap > ./autogen.sh > ./configure > make V=3D1 -j${CORES} > ... > make[2]: Entering directory '/usr/local/src/grub' > gcc -DHAVE_CONFIG_H -I. -Wall -W -DGRUB_UTIL=3D1 -D_FILE_OFFSET_BITS=3D= 64 -I./include -DGRUB_FILE=3D\"grub-core/fs/ntfscomp.c\" -I. -I. -I. -I. -I= ./include -I./include -I./grub-core/lib/libgcrypt-grub/src/ -I./grub-core/= lib/minilzo -I./grub-core/lib/xzembed -I./grub-core/lib/zstd -DMINILZO_HAVE= _CONFIG_H -O3 -Wall -fstack-protector-strong -funwind-tables -fasynchronous= -unwind-tables -fmessage-length=3D0 -grecord-gcc-switches -march=3Dnative -= mtune=3Dnative -D_FORTIFY_SOURCE=3D2 -D_FILE_OFFSET_BITS=3D64 -Wall -W -Wsh= adow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-decla= rations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-= args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declarat= ion -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmul= tichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare= -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused= -label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings= -Wnested-externs -Wstrict-prototypes -Wcast-align -Wextra -Wattributes -W= endif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-fiel= d-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-al= iasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-i= nclude-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=3D2 -Werro= r -fno-builtin -Wno-undef -O3 -Wall -fstack-protector-strong -funwind-tabl= es -fasynchronous-unwind-tables -fmessage-length=3D0 -grecord-gcc-switches = -march=3Dnative -mtune=3Dnative -MT grub-core/fs/libgrubmods_a-ntfscomp.o -= MD -MP -MF grub-core/fs/.deps-util/libgrubmods_a-ntfscomp.Tpo -c -o grub-co= re/fs/libgrubmods_a-ntfscomp.o `test -f 'grub-core/fs/ntfscomp.c' || echo '= ./'`grub-core/fs/ntfscomp.c > grub-core/fs/ntfscomp.c: In function =E2=80=98read_block=E2=80=99: > grub-core/fs/ntfscomp.c:82:11: error: =E2=80=98flg=E2=80=99 may be used = uninitialized in this function [-Werror=3Dmaybe-uninitialized] > 82 | if (flg & 0x8000) > | ^~~ > grub-core/fs/ntfscomp.c:74:17: note: =E2=80=98flg=E2=80=99 was declared = here > 74 | grub_uint16_t flg, cnt; > | ^~~ > cc1: all warnings being treated as errors > make[2]: *** [Makefile:7647: grub-core/fs/libgrubmods_a-ntfscomp.o] Erro= r 1 > make[2]: Leaving directory '/usr/local/src/grub' > make[1]: *** [Makefile:11920: all-recursive] Error 1 > make[1]: Leaving directory '/usr/local/src/grub' > make: *** [Makefile:3772: all] Error 2