SQLite Forum

Use of unitialized variable in 3.32.1
Login
In the `analyzeOneTable` function the following occurs:

```
for(j=0; j<pPk->nKeyCol; j++){
    k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[j]);
    assert( k>=0 && k<pIdx->nColumn );
    sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, regKey+j);
    VdbeComment((v, "%s.column(%d)", pIdx->zName, i));
}
```

Note the use of `i` in the last line's comment.  At least on GCC this gives a warning about the variable being possibly uninitialized and I think it was the intent to use `j` here.