From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.19217.1581323773392129456 for ; Mon, 10 Feb 2020 00:36:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ik5PobgU; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581323772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Fy77nzrrUbnqrrn6E8SJWeie4lDJsStVZ7hQRg8bj8=; b=Ik5PobgUXJJIIH88AyKXi+Y+BdlHNKuYIwk6DiCqBNiZRqxedNzfobPzb9fu4DIZsZQl5N ClneW65BstCs/vsFC/cO+y29WxEo9qSnYzceRkGz26x415lStU6Vbr/BvUCMlS6LccIDLw yaIo+triou578x6Tie8+ED7aoBYKgv8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-303-dguz6wcKM7a7z7WaoB5qMg-1; Mon, 10 Feb 2020 03:36:11 -0500 Received: by mail-wm1-f69.google.com with SMTP id s25so1243425wmj.6 for ; Mon, 10 Feb 2020 00:36:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2Fy77nzrrUbnqrrn6E8SJWeie4lDJsStVZ7hQRg8bj8=; b=kJe2WESQrU9n3hLb8+aXg0F1F9T8B/fsCl1sdzR0K/r5YmZ5xJgtU8gIDy1aLsHbdG vI1eZiwAL1QBjSoKcSE7rxAl/MzrtbiNF2qxc2Kbkqv3TVtGnYkWDgypUbumMXWI4NmU OUuyvVKCbANtEzefJv8Png2/fcCSJi6/NSLPD3DFC3AWRArBnJVJPyiDSVxAmV0EsAPZ kHwwwR4Q42P4f550SoptRMUcM/hGzDkSMYXOc0+V1L63yOY7B5ZiFK85+7Dl7PBGPG8I K84cYycNgfnbkBwHti13LupaLsE0hFv4LE5SNLXVqSJLUmx8PV7ylPxhS64adepdPj7O Mprg== X-Gm-Message-State: APjAAAU+yj4o3+rLAzyK9CUhF3Eh3SkRHdndUeX14RFk0etq15jW8E4q 4byK0Nl9S4a7kXGFCozZb8guKfFz9o4JseJhL1bElPAsv7Ed53zypCkt86cLgdtwjmpAXe65wUz ZgP9We4g27mX9lg== X-Received: by 2002:a7b:c152:: with SMTP id z18mr13930937wmi.70.1581323768613; Mon, 10 Feb 2020 00:36:08 -0800 (PST) X-Google-Smtp-Source: APXvYqykPBKz+S89fN9mwd5cpbLY92ZZIEbpxjawBFpHcC0Qf/muzGCBrXCkHHvZjhLD+J/nFEMaRQ== X-Received: by 2002:a7b:c152:: with SMTP id z18mr13930894wmi.70.1581323768156; Mon, 10 Feb 2020 00:36:08 -0800 (PST) Return-Path: Received: from [192.168.1.35] (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id y8sm14197228wma.10.2020.02.10.00.36.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Feb 2020 00:36:07 -0800 (PST) Subject: Re: [edk2-devel] [PATCH 1/2] IntelFsp2Pkg/GenCfgOpt.py: Coverity scan flags issues. To: devel@edk2.groups.io, chasel.chiu@intel.com Cc: Maurice Ma , Nate DeSimone , Star Zeng References: <20200210035329.19432-1-chasel.chiu@intel.com> <20200210035329.19432-2-chasel.chiu@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <9e7d3543-112e-2a09-b359-e71dd7e3de7b@redhat.com> Date: Mon, 10 Feb 2020 09:36:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200210035329.19432-2-chasel.chiu@intel.com> X-MC-Unique: dguz6wcKM7a7z7WaoB5qMg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 2/10/20 4:53 AM, Chiu, Chasel wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1706 > > Issue was: invalid_operation: Invalid operation on > null-like value "Base". > Fixed it by initializing Base to 0 before entering > while loop. > > Test: > Compared script output before and after this patch and > the result is identical. > > Cc: Maurice Ma > Cc: Nate DeSimone > Cc: Star Zeng > Signed-off-by: Chasel Chiu > --- > IntelFsp2Pkg/Tools/GenCfgOpt.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py > index 2fa7582d85..d1d6901bc3 100644 > --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py > +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py > @@ -1,6 +1,6 @@ > ## @ GenCfgOpt.py > # > -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
> # SPDX-License-Identifier: BSD-2-Clause-Patent > # > ## > @@ -439,6 +439,7 @@ EndList > > MaxAlign = 32 #Default align to 32, but if there are 64 bit unit, align to 64 > SizeAlign = 0 #record the struct max align > + Base = 0 #Starting offset of sub-structure. Are you sure this has to be initialized only once before the while statement, and not within the 'Check VPD/UPD' leaf? > while len(DscLines): > DscLine = DscLines.pop(0).strip() > Handle = False >