Commit dee955bd authored by Olivier Bertrand's avatar Olivier Bertrand

- fix use of uninitialized variable (colp)

modified:
  storage/connect/tabtbl.cpp
  storage/connect/tabutil.cpp
parent 35f81314
...@@ -239,14 +239,10 @@ bool TDBTBL::InitTableList(PGLOBAL g) ...@@ -239,14 +239,10 @@ bool TDBTBL::InitTableList(PGLOBAL g)
// We must allocate subtable columns before GetMaxSize is called // We must allocate subtable columns before GetMaxSize is called
// because some (PLG, ODBC?) need to have their columns attached. // because some (PLG, ODBC?) need to have their columns attached.
// Real initialization will be done later. // Real initialization will be done later.
for (PCOL cp = Columns; cp; cp = cp->GetNext()) for (colp = Columns; colp; colp = colp->GetNext())
if (!cp->IsSpecial()) { if (!colp->IsSpecial())
if (((PPRXCOL)cp)->Init(g) && !Accept) if (((PPRXCOL)colp)->Init(g) && !Accept)
return TRUE; return TRUE;
else // this is needed by some tables (which?)
colp->SetColUse(cp->GetColUse());
} // endif !special
if (Tablist) if (Tablist)
Tablist->Link(tabp); Tablist->Link(tabp);
......
...@@ -531,8 +531,12 @@ bool PRXCOL::Init(PGLOBAL g) ...@@ -531,8 +531,12 @@ bool PRXCOL::Init(PGLOBAL g)
Colp = tdbp->Tdbp->ColDB(g, NULL, Colnum); Colp = tdbp->Tdbp->ColDB(g, NULL, Colnum);
if (Colp) { if (Colp) {
Colp->InitValue(g); // May not have been done elsewhere // May not have been done elsewhere
Colp->InitValue(g);
To_Val = Colp->GetValue(); To_Val = Colp->GetValue();
// this may be needed by some tables (which?)
Colp->SetColUse(ColUse);
} else { } else {
sprintf(g->Message, MSG(NO_MATCHING_COL), Name, tdbp->Tdbp->GetName()); sprintf(g->Message, MSG(NO_MATCHING_COL), Name, tdbp->Tdbp->GetName());
return TRUE; return TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment