]> granicus.if.org Git - php/commitdiff
Cast to SQLUSMALLINT
authorKalle Sommer Nielsen <kalle@php.net>
Tue, 19 May 2009 10:25:38 +0000 (10:25 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Tue, 19 May 2009 10:25:38 +0000 (10:25 +0000)
ext/pdo_odbc/odbc_stmt.c

index e79008d7f0d2d8971dcbac32273ed2352a3ff0a4..e9865ec04ed1716de034876af183aeb251ce4cb1 100755 (executable)
@@ -181,7 +181,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p
                                                break;
                                }
 
-                               rc = SQLDescribeParam(S->stmt, param->paramno+1, &sqltype, &precision, &scale, &nullable);
+                               rc = SQLDescribeParam(S->stmt, (SQLUSMALLINT) param->paramno+1, &sqltype, &precision, &scale, &nullable);
                                if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
                                        /* MS Access, for instance, doesn't support SQLDescribeParam,
                                         * so we need to guess */
@@ -229,7 +229,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p
                                        return 0;
                                }
 
-                               rc = SQLBindParameter(S->stmt, param->paramno+1,
+                               rc = SQLBindParameter(S->stmt, (SQLUSMALLINT) param->paramno+1,
                                                P->paramtype, ctype, sqltype, precision, scale,
                                                P->paramtype == SQL_PARAM_INPUT ? 
                                                        (SQLPOINTER)param :