fixed C99 mode.
authorHiroshi Saito <hiroshi@winpg.jp>
Thu, 19 Nov 2020 08:47:03 +0000 (17:47 +0900)
committerHiroshi Saito <hiroshi@winpg.jp>
Thu, 19 Nov 2020 08:47:03 +0000 (17:47 +0900)
test/src/params-batch-exec-test.c

index d46f890becbe4d31d9c72d82e9242d27c683b609..0d3c45c64cae6232797aa16a0ed375a150fd02b0 100644 (file)
@@ -8,6 +8,7 @@
 
 static void b_result(SQLRETURN rc, HSTMT stmt,  int repcnt, SQLUSMALLINT status[])
 {
+   int i;
    printf("insert into test_batch returns %d\n", rc);
    if (!SQL_SUCCEEDED(rc))
        print_diag("", SQL_HANDLE_STMT, stmt);
@@ -15,7 +16,7 @@ static void b_result(SQLRETURN rc, HSTMT stmt,  int repcnt, SQLUSMALLINT status[
    if (SQL_SUCCESS != rc)
        disp_stmt_error(stmt);
    */
-   for (int i = 0; i < repcnt; i++)
+   for (i = 0; i < repcnt; i++)
    {
        printf("row %d status=%s\n", i,
            (status[i] == SQL_PARAM_SUCCESS ? "success" :