Liming, Thanks for asking this question. I just realized that this error only happens with the Xcode gcc and not clang. The OvmfPkg was pointing in error to the XCODE32 (Xcode 3.2) tool chain which was gcc based. This was the older compiler being overly aggressive in its warning and not allowing it to be cast away.
Thus we do NOT need this change. Andrew Fish On Jan 15, 2013, at 6:00 PM, "Gao, Liming" <liming....@intel.com> wrote: > Fish: > Does this patch fix the following code? > Address = EFI_PCI_ADDRESS (Bus, Device, Function, RomBarIndex); > > But, EFI_PCI_ADDRESS is defined as below. Its Reg will be type cast by > (UINTN) first. So, I think this code should have no issue. Could you give > more detail for it? > #define EFI_PCI_ADDRESS(bus, dev, func, reg) \ > (UINT64) ( \ > (((UINTN) bus) << 24) | \ > (((UINTN) dev) << 16) | \ > (((UINTN) func) << 8) | \ > (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) > (reg), 32)))) > > Thanks > Liming > From: Andrew Fish [mailto:af...@apple.com] > Sent: Wednesday, January 16, 2013 5:58 AM > To: edk2-devel@lists.sourceforge.net > Subject: [edk2] [Patch] MdeModulePkg: Fix Xcode warning > > Dear MdeModulePkg maintainer, > > Please review this patch that fixes a warning with Xcode. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: af...@apple.com > > svn diff --diff-cmd diff Bus/Pci/PciBusDxe/PciOptionRomSupport.c > Index: Bus/Pci/PciBusDxe/PciOptionRomSupport.c > =================================================================== > --- Bus/Pci/PciBusDxe/PciOptionRomSupport.c (revision 14050) > +++ Bus/Pci/PciBusDxe/PciOptionRomSupport.c (working copy) > @@ -236,7 +236,7 @@ > IN OUT PCI_IO_DEVICE *PciIoDevice > ) > { > - UINT8 RomBarIndex; > + UINT16 RomBarIndex; > UINT32 AllOnes; > UINT64 Address; > EFI_STATUS Status; > > > Andrew Fish > > > > > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel