Skip to content

Commit 18e5350

Browse files
committed
OPTIMIZATION #4 (FIX): Remove unused columnSize variables (Windows build fix)
Same issue as OPT #3 - Windows compiler treats warnings as errors (/WX). The columnSize variable was extracted but unused in SQL_CHAR and SQL_WCHAR cases after OPTIMIZATION #4. Changes: -------- - Removed unused 'SQLULEN columnSize' from SQL_CHAR/VARCHAR/LONGVARCHAR - Removed unused 'SQLULEN columnSize' from SQL_WCHAR/WVARCHAR/WLONGVARCHAR - Retained fetchBufferSize and isLob which are actively used Fixes Windows build error C4189 treated as error C2220.
1 parent e1e827a commit 18e5350

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mssql_python/pybind/ddbc_bindings.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3283,7 +3283,6 @@ SQLRETURN FetchBatchData(SQLHSTMT hStmt, ColumnBuffers& buffers, py::list& colum
32833283
case SQL_CHAR:
32843284
case SQL_VARCHAR:
32853285
case SQL_LONGVARCHAR: {
3286-
SQLULEN columnSize = columnSizes[col - 1];
32873286
uint64_t fetchBufferSize = fetchBufferSizes[col - 1];
32883287
uint64_t numCharsInData = dataLen / sizeof(SQLCHAR);
32893288
bool isLob = isLobs[col - 1];
@@ -3302,7 +3301,6 @@ SQLRETURN FetchBatchData(SQLHSTMT hStmt, ColumnBuffers& buffers, py::list& colum
33023301
case SQL_WVARCHAR:
33033302
case SQL_WLONGVARCHAR: {
33043303
// TODO: variable length data needs special handling, this logic wont suffice
3305-
SQLULEN columnSize = columnSizes[col - 1];
33063304
uint64_t fetchBufferSize = fetchBufferSizes[col - 1];
33073305
uint64_t numCharsInData = dataLen / sizeof(SQLWCHAR);
33083306
bool isLob = isLobs[col - 1];

0 commit comments

Comments
 (0)