1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-04 04:42:30 +03:00

MCOL-5747 gcc-14.1.1 compile error - calloc - transposed args

The arguments of calloc are the number of members and the sizeof the
member. Gcc-14.1.1 worked out how to tell the difference.

We correct this by transposing to gcc's will.
This commit is contained in:
Daniel Black
2024-05-14 15:27:15 +10:00
committed by Leonid Fedorov
parent f75baa8a40
commit c01ab42e87

View File

@ -1099,8 +1099,8 @@ inline void allocateValArray(void*& valArray, ColTupleList::size_type totalRow,
case WriteEngine::WR_VARBINARY: // treat same as char for now
case WriteEngine::WR_CHAR:
case WriteEngine::WR_BLOB:
case WriteEngine::WR_TEXT: valArray = calloc(sizeof(char), totalRow * MAX_COLUMN_BOUNDARY); break;
case WriteEngine::WR_TOKEN: valArray = calloc(sizeof(Token), totalRow); break;
case WriteEngine::WR_TEXT: valArray = calloc(totalRow * MAX_COLUMN_BOUNDARY, sizeof(char)); break;
case WriteEngine::WR_TOKEN: valArray = calloc(totalRow, sizeof(Token)); break;
default: valArray = calloc(totalRow, colWidth); break;
}
}