From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.17838.1606477370127246704 for ; Fri, 27 Nov 2020 03:42:50 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BBCE831B; Fri, 27 Nov 2020 03:42:49 -0800 (PST) Received: from [192.168.1.81] (unknown [10.37.8.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E0F4B3F71F; Fri, 27 Nov 2020 03:42:48 -0800 (PST) Subject: Re: [PATCH edk2-platforms 06/17] Silicon/Socionext: fix unused variable error NorFlashFvb To: Leif Lindholm , devel@edk2.groups.io References: <20201127113140.6904-1-leif@nuviainc.com> From: "Ard Biesheuvel" Message-ID: Date: Fri, 27 Nov 2020 12:42:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201127113140.6904-1-leif@nuviainc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/27/20 12:31 PM, Leif Lindholm wrote: > When building in NOOPT mode, SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c > fails to build with -Werror=unused-but-set-variable due to the Instance > variable being set from the This pointer but never actually referenced. > > Cc: Ard Biesheuvel > Signed-off-by: Leif Lindholm Acked-by: Ard Biesheuvel > --- > > Submitting as a single additional patch rather than a full v2. > (Patch 17 is Ard's new one increasing the FV size for DeveloperBoxMm.) > > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c > index 387789fb9782..48774e955faf 100644 > --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c > +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c > @@ -209,9 +209,6 @@ FvbGetAttributes( > ) > { > EFI_FVB_ATTRIBUTES_2 FlashFvbAttributes; > - NOR_FLASH_INSTANCE *Instance; > - > - Instance = INSTANCE_FROM_FVB_THIS(This); > > FlashFvbAttributes = EFI_FVB2_READ_ENABLED_CAP | EFI_FVB2_READ_STATUS | > EFI_FVB2_WRITE_ENABLED_CAP | EFI_FVB2_WRITE_STATUS | >