fixed loop initial declaration used outside C99 mode.
authorHiroshi Saito <hiroshi@winpg.jp>
Tue, 26 May 2020 10:00:35 +0000 (19:00 +0900)
committerHiroshi Saito <hiroshi@winpg.jp>
Tue, 26 May 2020 10:00:35 +0000 (19:00 +0900)
execute.c

index fc8ef7bea8c3fa27a00f9475b29928e474576559..25985fa3bc65b546788a0cd022fd9cb7d999a3d1 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -410,9 +410,10 @@ const char *GetSvpName(const ConnectionClass *conn, char *wrk, int wrksize)
 static
 void param_status_batch_update(IPDFields *ipdopts, RETCODE retval, SQLLEN target_row, int count_of_deffered)
 {
+   int i, j;
    if (NULL != ipdopts->param_status_ptr)
    {
-       for (int i = target_row, j = 0; i >= 0 && j <= count_of_deffered; i--)
+       for (i = target_row, j = 0; i >= 0 && j <= count_of_deffered; i--)
        {
            if (SQL_PARAM_UNUSED != ipdopts->param_status_ptr[i])
            {
@@ -501,7 +502,8 @@ MYLOG(0, "about to begin SC_execute exec_type=%d\n", exec_type);
    if (LAST_EXEC == exec_type &&
        NULL != ipdopts->param_status_ptr)
    {
-       for (int i = end_row; i >= start_row; i--)
+       int i;
+       for (i = end_row; i >= start_row; i--)
        {
            if (SQL_PARAM_UNUSED != ipdopts->param_status_ptr[i])
            {