From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 70FCB2035626F for ; Tue, 5 Dec 2017 06:10:00 -0800 (PST) Received: by mail-wr0-x241.google.com with SMTP id o2so443882wro.5 for ; Tue, 05 Dec 2017 06:14:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XA68dRY9D0XgssC6FX2d0DhM31p89jRU/sETdP+nBQc=; b=MmsxJlzkMNkuq77h4bxCCFo5W/0ek4WSp0ijqj4ViS7dTnZPY4zYxAGEspMN3KkD7z BrI8MY9EW7CfAfKkC3tVD4uyLqbUtiY6vjy2mbePMn4cCFBoS4TVl0KjfT4eIlwoeyN8 4y7mIp8ACZ5BOOtQy0T6E+D0lst1iLxTkPyoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XA68dRY9D0XgssC6FX2d0DhM31p89jRU/sETdP+nBQc=; b=ox1Dp46GdtYo/t4CtpzZgmtf5aNcPRCtggKH2D+0cWeU7TMo7MnhNNNk1OrrS/43Kc w1cNJIvDx4wkvOkNO6b4FLVvaLdFWtrJrPeYPikwhA3EnAW9IflY+3FRLAdSU8wOA3fs n3LWuOyyrxuqY4SzPCK0e5K3efJLvq0kY9UVe2DlCLi9HiaSfhDiAKnJuaaMEbj1QVY1 OTXrVpjnx4AgsW88PCtFf7wKB9L1dN2xSZ6f23/DiU5+Hfa0cY//nQt0Rbq5/i7KV7Wc MrU2Fab6LmtVVl0MULGjfBuw4B44uikpPLEzd+haiN+ghzh4j4ZrBW/cKYRMScrwpJQ7 Nabw== X-Gm-Message-State: AJaThX5JVofZB548/ZrXP8+/pYH7+VNPu+tBGvI5UuGQsy8SlRwf5Wlf Nk14A6vM3W+u+khnh+mcDcQLdw== X-Google-Smtp-Source: AGs4zMaDzSWcH8g9F3MbA4A4dS/genZfDjh6W0e9cdsIo3VdY1LoV88kxKzS51xohOdYzL+DiYEv4Q== X-Received: by 10.223.134.1 with SMTP id 1mr16191178wrv.213.1512483269338; Tue, 05 Dec 2017 06:14:29 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id q2sm604658wma.19.2017.12.05.06.14.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Dec 2017 06:14:28 -0800 (PST) Date: Tue, 5 Dec 2017 14:14:26 +0000 From: Leif Lindholm To: Yonghong Zhu Cc: edk2-devel@lists.01.org, Liming Gao Message-ID: <20171205141426.jbvgo37c3jszupqy@bivouac.eciton.net> References: <1512482099-2156-1-git-send-email-yonghong.zhu@intel.com> MIME-Version: 1.0 In-Reply-To: <1512482099-2156-1-git-send-email-yonghong.zhu@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [Patch] BaseTools: Fix GenSec GCC make failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 14:10:00 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 05, 2017 at 09:54:59PM +0800, Yonghong Zhu wrote: > It is a regression bug introduced by the patch b37b108, it cause GenSec > make failure on GCC Env. > > Cc: Liming Gao > Cc: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu I can confirm this resolves my issue - pick either or both of: Tested-by: Leif Lindholm Reviewed-by: Leif Lindholm Thanks! > --- > BaseTools/Source/C/GenSec/GenSec.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c > index 2b2def1..5545f12 100644 > --- a/BaseTools/Source/C/GenSec/GenSec.c > +++ b/BaseTools/Source/C/GenSec/GenSec.c > @@ -1324,11 +1324,11 @@ Returns: > // Open file and read contents > // > DummyFile = fopen (LongFilePath (DummyFileName), "rb"); > if (DummyFile == NULL) { > Error (NULL, 0, 0001, "Error opening file", DummyFileName); > - return EFI_ABORTED; > + goto Finish; > } > > fseek (DummyFile, 0, SEEK_END); > DummyFileSize = ftell (DummyFile); > fseek (DummyFile, 0, SEEK_SET); > @@ -1338,22 +1338,22 @@ Returns: > DebugMsg (NULL, 0, 9, "Dummy files", "the dummy file name is %s and the size is %u bytes", DummyFileName, (unsigned) DummyFileSize); > > InFile = fopen(LongFilePath(InputFileName[0]), "rb"); > if (InFile == NULL) { > Error (NULL, 0, 0001, "Error opening file", InputFileName[0]); > - return EFI_ABORTED; > + goto Finish; > } > > fseek (InFile, 0, SEEK_END); > InFileSize = ftell (InFile); > fseek (InFile, 0, SEEK_SET); > InFileBuffer = (UINT8 *) malloc (InFileSize); > fread(InFileBuffer, 1, InFileSize, InFile); > fclose(InFile); > DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[0], (unsigned) InFileSize); > if (InFileSize > DummyFileSize){ > - if (stricmp(DummyFileBuffer, InFileBuffer + (InFileSize - DummyFileSize)) == 0){ > + if (stricmp((CHAR8 *)DummyFileBuffer, (CHAR8 *)(InFileBuffer + (InFileSize - DummyFileSize))) == 0){ > SectGuidHeaderLength = InFileSize - DummyFileSize; > } > } > if (SectGuidHeaderLength == 0) { > SectGuidAttribute |= EFI_GUIDED_SECTION_PROCESSING_REQUIRED; > -- > 2.6.1.windows.1 >