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

index 6adfadb6991902151db2afed5d598345e0bbc969..d9489870176a7adab6c2c6bc1c3e97f8751b6cd9 100755 (executable)
@@ -307,7 +307,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 */
@@ -364,7 +364,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 :