I use handmade toolchain (FreeBSD-10, clang 3.4.1) for compile only verification of my project. This compile was IA32, DEBUG one.
Yes, this patch does the job, but one case missing: Function UsbSelectSetting() (file UsbEnumer.c, line 321) use local variable (UINT8 Index). On Tue, Sep 9, 2014 at 5:11 AM, Tian, Feng <feng.t...@intel.com> wrote: > Hi, Nikolai > > Could I know which tool chain and build option you are using? > > And here is a patch, could you help me have a verification? > > Thanks > Feng > > -----Original Message----- > From: Nikolai Saoukh [mailto:n...@otdel-1.org] > Sent: Monday, September 08, 2014 00:53 > To: EDK2 Developers > Subject: [edk2] Error: constatnt 256 does not fit UINT8 > > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c:111:31: error: comparison of > constant 256 with expression of type 'UINT8' (aka 'unsigned char') is always > true [-Werror,-Wtautological-constant-out-of-range-compare] > ASSERT (IfDesc->ActiveIndex < USB_MAX_INTERFACE_SETTING); > ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ > MdePkg/Include/Library/DebugLib.h:265:15: note: expanded from macro 'ASSERT' > if (!(Expression)) { \ > ^ > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c:329:19: error: comparison of > constant 256 with expression of type 'UINT8' (aka 'unsigned char') is always > true [-Werror,-Wtautological-constant-out-of-range-compare] > ASSERT (Index < USB_MAX_INTERFACE_SETTING); > ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ > MdePkg/Include/Library/DebugLib.h:265:15: note: expanded from macro 'ASSERT' > if (!(Expression)) { \ > ^ > 2 errors generated. > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce. Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel