On 07/10/15 02:09, Bill Paul wrote: > The FileReserved variable in QemuFwCfgFindFile() is only used to skip > over the reserved field in file headers, which causes newer versions of > GCC to flag it with a "variable set but not used" warning (which is normally > not visible since as of right now these warnings are supressed). It's true > that the value read into FileReserved is never used, but this is > intentional. This patch adds a do-nothing reference to silence the > warning. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Bill Paul <wp...@windriver.com> > > --- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > index 24424f8..573d90f 100644 > --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > @@ -283,6 +283,7 @@ QemuFwCfgFindFile ( > FileSize = QemuFwCfgRead32 (); > FileSelect = QemuFwCfgRead16 (); > FileReserved = QemuFwCfgRead16 (); > + (VOID) FileReserved; /* Force a do-nothing reference. */ > InternalQemuFwCfgReadBytes (sizeof (FName), FName); > > if (AsciiStrCmp (Name, FName) == 0) { >
Reviewed-by: Laszlo Ersek <ler...@redhat.com> I committed the patch (with a slight update to the subject) to SVN as r17920. Thank you. Laszlo ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel