Changeset: 829fd52ff8c0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/829fd52ff8c0 Modified Files: clients/odbc/driver/SQLGetConnectAttr.c clients/odbc/tests/odbcconnect.c Branch: Aug2024 Log Message:
small compilation fixes. diffs (57 lines): diff --git a/clients/odbc/driver/SQLGetConnectAttr.c b/clients/odbc/driver/SQLGetConnectAttr.c --- a/clients/odbc/driver/SQLGetConnectAttr.c +++ b/clients/odbc/driver/SQLGetConnectAttr.c @@ -62,11 +62,11 @@ MNDBGetConnectAttr(ODBCDbc *dbc, * SQL_ATTR_ENABLE_AUTO_IPD */ WriteData(ValuePtr, SQL_TRUE, SQLUINTEGER); break; - case SQL_ATTR_AUTOCOMMIT: /* SQLUINTEGER */ + case SQL_ATTR_AUTOCOMMIT: { /* SQLUINTEGER */ /* SQL_AUTOCOMMIT */ bool autocommit = msetting_bool(dbc->settings, MP_AUTOCOMMIT); WriteData(ValuePtr, autocommit, SQLUINTEGER); - break; + } break; case SQL_ATTR_CONNECTION_DEAD: /* SQLUINTEGER */ WriteData(ValuePtr, dbc->mid && mapi_is_connected(dbc->mid) ? SQL_CD_FALSE : SQL_CD_TRUE, SQLUINTEGER); break; diff --git a/clients/odbc/tests/odbcconnect.c b/clients/odbc/tests/odbcconnect.c --- a/clients/odbc/tests/odbcconnect.c +++ b/clients/odbc/tests/odbcconnect.c @@ -22,6 +22,7 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> +#include <inttypes.h> #include <sql.h> #include <sqlext.h> #include <sqlucode.h> @@ -417,6 +418,7 @@ do_listdsns(const char *prefix, SQLSMALL return 0; } +#define LLFMT "%" PRId64 static int do_execute_stmt(void) @@ -455,7 +457,7 @@ do_execute_stmt(void) SQL_HANDLE_STMT, stmt, "SQLNumResultCols", SQLNumResultCols(stmt, &colcount)); - printf("RESULT rows=%ld: ", rowcount); + printf("RESULT rows=" LLFMT ": ", (int64_t)rowcount); char *sep = ""; for (int i = 1; i <= colcount; i++) { printf("%s", sep); @@ -488,9 +490,9 @@ do_execute_stmt(void) SQLColAttributeW(stmt, i, SQL_DESC_SCALE, NULL, 0, NULL, &scale)); if (!fixed || scale) { if (scale > 0) - printf("(%ld,%ld)", len, scale); + printf("(" LLFMT "," LLFMT ")", (int64_t)len, (int64_t)scale); else - printf("(%ld)", len); + printf("("LLFMT ")", (int64_t)len); } } printf("\n"); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org