From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.3014.1602645038854422798 for ; Tue, 13 Oct 2020 20:10:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=hYA2WfRh; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: bob.c.feng@intel.com) IronPort-SDR: XqhxXEEDGlIIJQ/4iC7fqf8tsd1WvDg/g4EqtwXuT9MCumIa4ONOVGufiArWRImQ3iuSVYOnyo +OSYfj5IePeg== X-IronPort-AV: E=McAfee;i="6000,8403,9773"; a="250723047" X-IronPort-AV: E=Sophos;i="5.77,373,1596524400"; d="scan'208";a="250723047" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 20:10:37 -0700 IronPort-SDR: vMUGYD0klKCI8lpUVx2bZduTtYrI/c92ZfBh5FmVrsmwoRHYNGZ3PtKQlgbzPfUm8AlKCZRAc2 gKzHhldBGGDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,373,1596524400"; d="scan'208";a="356482173" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2020 20:10:37 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 13 Oct 2020 20:10:36 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 13 Oct 2020 20:10:36 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 13 Oct 2020 20:10:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GLTdilj8OSYKG85athVfCndxBL5zkCI2Bgko3e2FUWmZ9cPtCa5Pwa6m6wiw7wohGQLWdq2D1mR6/A2LGG1z418omQBaZVBDs6L/FL+TN8nzWPcRa4JMxPgnmE69QKLdakgXHyB5xtWZ1jypt2BAlBuS7eIzR5b6zPN/9LR5lDf2A1C9p1k0Qi1i79m1qKaDNFDQH3lTqQ095J0tOHOp4ENl3kdfDUqzGBpecpX6+V3g/s7lOzYTjUQAOHjOc1LyIvlMVBScUt2teZN1gaGPsgAljKJ0BhgEoYfZbIRTEwxZy5qpzcU+KDPuB9SwKWWHbFIsdB2S+VDxSLMG9vJ6AA== 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=UXk83NHMvLpNnq2JruBtIxtCQJrDLmAmddGqAy002mo=; b=YFR2IizbBdEnL9x7bd6CULVaKa9WX+a/bufyMvh2b4fXMyhFOMfacNPvUfyhJDZ/vLMPI1En3BikyrG0CU3uLnBlHeont6XQMIRuQUtSc/6TQe/fjWocBFJbMDhZMkL6Oq8GCJQ3IJTmRiojWOOrRrDlgZY4BhMjrdMZy/W3yABLNdlcDdsvs7UZR26tJpUhM85olfjkK6E0J89/sITy4TK4aJIgbduk09/pPIwWrb+DokQqhzR2gzrWayL0XL+eoeNRT1TzMAqErg3Whnh/Uw0ocM1pz+5Lh6gurTbU3mwiyWYpZmCbwT6rsVvcdJqXJkT4TV5lOkvJgirTzA0V2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UXk83NHMvLpNnq2JruBtIxtCQJrDLmAmddGqAy002mo=; b=hYA2WfRhLP6Bkxg1FLNGMLmRjdEitakPap+7USvfOK2ieO931KEcuveX9IzD8pYQvOOgmZMBlKrxCsEEp7ffn3csHyN1oPatxL01KuRxuMb8/B+AoXJNDI73gFFgdfCCShAlmqs1il5spIsz7pO9D2aSnpZxmfmJ+1OFhKCA3Z0= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB4329.namprd11.prod.outlook.com (2603:10b6:5:201::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.24; Wed, 14 Oct 2020 03:10:34 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::cd42:ed68:e66a:1eaa]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::cd42:ed68:e66a:1eaa%7]) with mapi id 15.20.3455.030; Wed, 14 Oct 2020 03:10:34 +0000 From: "Bob Feng" To: Yunhua Feng , "devel@edk2.groups.io" CC: Liming Gao Subject: Re: [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue Thread-Topic: [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue Thread-Index: AQHWodTR7bBRHZvAsUKa+mp3EPR93KmWasPQ Date: Wed, 14 Oct 2020 03:10:34 +0000 Message-ID: References: <20201014024929.1945-1-fengyunhua@byosoft.com.cn> In-Reply-To: <20201014024929.1945-1-fengyunhua@byosoft.com.cn> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: byosoft.com.cn; dkim=none (message not signed) header.d=none;byosoft.com.cn; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2076e413-0e47-4e0f-161f-08d86feeb799 x-ms-traffictypediagnostic: DM6PR11MB4329: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:486; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GIdfepBmdq9XuUS7Jfk5ooMfTwnYLpIUnxnjVIRXArE3zyd5itbGLCu6TbcB/EBUCRSKG5yIUfidyBLPQmjuryROtrBFOZiIU6qZCttS76KtOWc+jhmyzl1pc2yarF9A6Omb/w3h+NZ+40kr9dzndDAEkiMKqUcQYx98f/UQ5bfXd79wjqJoAczwh7O7NarMZVajfNpfvCECrvUHsuYljdu16BEjLHOmPbU81aMhUyDAV1PPxi2vwrvNiIgI3R0VIZ6M8hFOiW++8NxfcvU+2VCwybZnwJFGexZed4fKkAswDUfQfN5Gf2PqTV3SVv+/8dusitIPVhJoE8FBljAk1Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(39860400002)(346002)(136003)(366004)(396003)(86362001)(6506007)(8676002)(4326008)(53546011)(478600001)(2906002)(33656002)(83380400001)(9686003)(66556008)(5660300002)(66476007)(186003)(316002)(26005)(64756008)(71200400001)(66946007)(110136005)(52536014)(66446008)(55016002)(76116006)(7696005)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: +v9mQzpXD2fwrq0MZe3Ekdd9aPvSLkXp16HYdjX6KNaLeA3mhuECPQtKdRJDW7ykmuYg40DiwuzVr5GBeX/ZfIdQl9RfZLNn1dXXYo+ZD1zV/zemiFP2OpariIoC2vLEO/IfOsH2IqY59xGq7E7XV8SpImnpaCAZsuhtsU88qFyn5GEAGLyeB81KY/kawpLjxefUmSNV9BbFoTcedEDFfA+m5oCLcSQVUma6WcjCPVQ1CUoDFF/sWNCTqOuACnM0oM3UQbkGUGFrdaZp468Ww16DsCO5j/7rFdYwQB+vtp6O6K8ZWrM2Ezz/v219j0ykK0jYTtf66S3C82zPUNYCc/uW1719URNhkK1OHhUF6BHMzjGqY6pAuzyt1A3fiqMPLWwqJqMNXrA9T28kqg1uSdWyHuEzT6PcUhU9sbkW30o0w1Zs0qDQ779WI8Npa1QN9iO2xPI+8mbhEH4k8sGy5yvTK3GkdB1G1B7bnutxJTses+CEN7+YTELEA+VScGrRQbB+eRoVNrnTn4nVNYNgkL79FUqjsAqxt1+BlmEqs3Z1rw/WsR/+GP2AWWXfwR+AEI9tZqF8dzgqw2FC8BrMm6j8rby0Hy1BiznR7/J0MR4LDJpRHmKIVIHpK5Jr0ufFIxaQ0KoVIPWotigYI8qD/Q== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2076e413-0e47-4e0f-161f-08d86feeb799 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2020 03:10:34.4968 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cK1lQqSOUzf3B45IsMjrBmToe/w2GPybrCIlQRL2DTCSzuvZdSwXCxqSxWFjlGJcR+/AZqyG9wfh/wO/LiqluA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4329 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This patch looks good. Reviewed-by: Bob Feng -----Original Message----- From: Yunhua Feng =20 Sent: Wednesday, October 14, 2020 10:49 AM To: devel@edk2.groups.io Cc: Feng, Bob C ; Liming Gao Subject: [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build br= eak issue Remove some defined variable but not used. Linux build option[-Werror=3Dunused-but-set-variable] treat all warnings a= s errors. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Yunhua Feng --- BaseTools/Source/C/FMMT/FirmwareModuleManagement.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c b/BaseTools= /Source/C/FMMT/FirmwareModuleManagement.c index 20663ba163..38056153fb 100644 --- a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c +++ b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c @@ -1717,11 +1717,6 @@ FmmtImageExtract ( FV_INFORMATION *FvInFd; UINT32 Index; UINT32 FfsFoundFlag; - FFS_INFORMATION *OutputFileName; - FILE* NewFdFile; - FILE* NewFvFile; - UINT64 NewFvLength; - VOID* Buffer; CHAR8 *TemDir; UINT8 FvNumInFd; UINT32 Offset; @@ -1736,23 +1731,18 @@ FmmtImageExtract ( UINT32 FfsSize; UINT32 FdSize; int j; - CHAR8 FfsOutputFileName[_MAX_DIR]; + CHAR8 FfsOutputFileName[_MAX_PATH]; =20 FdSize =3D 0; Index =3D 0; - NewFvLength =3D 0; FfsFoundFlag =3D 0; FdData =3D NULL; FvInFd =3D NULL; - OutputFileName =3D NULL; - NewFdFile =3D NULL; - NewFvFile =3D NULL; - Buffer =3D NULL; TemDir =3D NULL; FvNumInFd =3D 0; Offset =3D 0; FdBuffer =3D NULL; - if (sizeof(FfsOutFileOrDirName) > _MAX_DIR) { + if (strlen(FfsOutFileOrDirName) > _MAX_PATH - 1) { Error("FMMT", 0, 0004, "error while input file name", "Output director= y path is too long" ); return EFI_ABORTED; } --=20 2.27.0.windows.1