Closed
Bug 14653
Opened 26 years ago
Closed 25 years ago
small pointer problem in db/mork/src/morkDeque.cpp?
Categories
(Core Graveyard :: Tracking, defect, P3)
Core Graveyard
Tracking
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: colin, Assigned: Bienvenu)
Details
This belongs to Mork, but there's no component for Mork (or DB) yet!
In db/mork/src/morkDeque.cpp, there is the following code:
void morkNext::ZapOldNext(morkEnv* ev, nsIMdbHeap* ioHeap)
{
if ( &ioHeap )
{
if ( this )
ioHeap->Free(ev->AsMdbEnv(), this);
}
else
ev->NilPointerError();
}
The OpenVMS C++ compiler complains that the last statement (the call
to NilPointerError) is unreachable.
Since ioHeap is a pointer, I guess that &ioHeap is the address of the
pointer. And since this is always non-zero, even for a null pointer,
the if test doesn't make sense???
Anyway, thought you might want to look at this and maybe give it
some consideration.
Colin.
| Reporter | ||
Comment 1•26 years ago
|
||
Same goes for morkLink::ZapOldLink. That makes two occurences of this
"problem" in morkDequeue.cpp.
Updated•26 years ago
|
Assignee: chofmann → davidmc
Comment 2•26 years ago
|
||
-> davidmc
Okay, I'll fix it; originally the code would have passed nsIMdbHeap as
a reference, so that &ioHeap would yield actual the pointer. All I can
say is I wrote the code in a hurry one day when making change lists for
incrementally writing tables. Thanks for reporting this.
Updated•25 years ago
|
Target Milestone: M14
| Assignee | ||
Comment 7•25 years ago
|
||
fix checked in - if ioheap were null, I think we would have crashed, so this was
useful to fix.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
QA Contact: davidmc → stephend
1.6 bienvenu%netscape.com Jun 22 2000 fix build warning 14653
Status: RESOLVED → VERIFIED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•