Skip to content

Commit 7971d96

Browse files
Polaris scan fixes
Signed-off-by: Balram Choudhary <[email protected]>
1 parent ffc3dda commit 7971d96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ibm_db.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9440,15 +9440,15 @@ static int _python_ibm_db_bind_data(stmt_handle *stmt_res, param_node *curr, PyO
94409440
ts->timezone_minute = -ts->timezone_minute;
94419441

94429442
if (ts->timezone_hour < -14 || ts->timezone_hour > 14) {
9443-
snprintf(messageStr, sizeof(messageStr),"Item %zd: timezone hour out of range:%d", i, ts->timezone_hour);
9443+
snprintf(messageStr, sizeof(messageStr),"Item %d: timezone hour out of range:%d", i, (int)ts->timezone_hour);
94449444
LogMsg(EXCEPTION, messageStr);
9445-
PyErr_Format(PyExc_ValueError, "Item %zd: timezone hour out of range:%d", i, ts->timezone_hour);
9445+
PyErr_Format(PyExc_ValueError, "Item %d: timezone hour out of range:%d", i, (int)ts->timezone_hour);
94469446
}
94479447

94489448
if (abs(ts->timezone_minute) > 59) {
9449-
snprintf(messageStr, sizeof(messageStr),"Item %zd: timezone hour out of range:%d", i, ts->timezone_minute);
9449+
snprintf(messageStr, sizeof(messageStr),"Item %d: timezone minute out of range:%d", i, (int)ts->timezone_minute);
94509450
LogMsg(EXCEPTION, messageStr);
9451-
PyErr_Format(PyExc_ValueError, "Item %zd: timezone minute out of range:%d", i, ts->timezone_minute);
9451+
PyErr_Format(PyExc_ValueError, "Item %zd: timezone minute out of range:%d", i, (int)ts->timezone_minute);
94529452
}
94539453
snprintf(messageStr, sizeof(messageStr), "List item index %d: year=%d, month=%d, day=%d, hour=%d, minute=%d, second=%d, fraction=%d, timezone_hour=%d, timezone_minute=%d, curr->bind_indicator_array[%d] = SQL_NTS;", i,
94549454
ts->year, ts->month, ts->day, ts->hour, ts->minute, ts->second, ts->fraction, ts->timezone_hour, ts->timezone_minute,i);

0 commit comments

Comments
 (0)