You get these warnings because the initialization statements in for
loops are expressions that do nothing:
for(col; col < num_cols; col++) // line 92: "col" has no effect for(row; row < num_rows; row++) // line 95: "row" has no effect
Since you have already initialized these variables outside the loop, you can omit them from the for
statement:
for(; col < num_cols; col++) // line 92 for(; row < num_rows; row++) // line 95
However, the best thing here is to initialize the variables in the for
loops themselves, and not outside of them:
// Call the gc enum callback for each nested table size_t num_cols = m_table->numCols(), num_rows = m_table->numRows(); for(size_t col = 0; col < num_cols; col++ ) // Line 92 { if (m_table->getColType(col) == COL_TABLE) { for (size_t row = 0; row < num_rows; row++){ // Line 95 Table * tbl = m_table->getTable(row, col); engine->GCEnumCallback(tbl); } } }
source share