that operation must have taken place during the initial development process then because the line exists since the Initial commitof that file 'a405b86 udk2010.up2.shell initial release.'
jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> is to blame :) On Thu, Jun 30, 2016 at 5:18 PM, Carsey, Jaben <[email protected]> wrote: > Interesting… My guess would be that is used to do something and is the > side effect of a find and replace operation and it should have been > removed, but wasn’t… > > > > -Jaben > > > > > > > > *From:* [email protected] [mailto: > [email protected]] > *Sent:* Wednesday, June 29, 2016 1:22 AM > *To:* Michael Zimmermann <[email protected]> > *Cc:* [email protected]; Carsey, Jaben <[email protected]>; > Qiu, Shumin <[email protected]> > *Subject:* RE: [edk2] weird ShellPkg line > *Importance:* High > > > > Hi, > > > > yes that’s right. I found those TRUE-Asserts on various other projects as > well and I never saw any good reason for this. > > My most popular assumptions are that this is some kind of “prepare an > assert here, so it can be enabled easily”. > > Or “let the debug message be part of the binary, so I can find this line > of code more easily in the debugger without symbols”. > > > > Maybe someone here has any good reason for such constructs. I lived with > my assumptions about that. > > > > Best Regards, > > Peter > > > > *From:* Michael Zimmermann [mailto:[email protected] > <[email protected]>] > *Sent:* Wednesday, June 29, 2016 10:12 AM > *To:* Kirmeier, Peter > *Cc:* [email protected]; Jaben Carsey; Shumin Qiu > *Subject:* Re: [edk2] weird ShellPkg line > > > > Hi, > > > > but doesn't ASSERT only trigger if the condition is not true? > > to me it looks like this ASSERT would never show an error. > > > > Thanks, > > Michael > > > > On Wed, Jun 29, 2016 at 9:53 AM, [email protected] < > [email protected]> wrote: > > Hi Michael, > > for me it looks like an ASSERT(TRUE) when no GUID comparison matched. > It actually produces a more readable debug message rather than "TRUE" > which allows you to find the actual ASSERT faster. > > Best Regards, > Peter > > > -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of > Michael Zimmermann > Sent: Wednesday, June 29, 2016 9:42 AM > To: [email protected] > Cc: Jaben Carsey; Shumin Qiu > Subject: [edk2] weird ShellPkg line > > Hi, > > I found this weird line in ShellPkg(which also throws a warning in GCC6). > What does it do? > > ASSERT((*HandleType)[HandleIndex] == (*HandleType)[HandleIndex]); > > > https://github.com/tianocore/edk2/blob/master/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c#L2465 > > > Thanks > Michael > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel > > > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

