Fix compilation errors with vc10 caused by the previous commit.
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Thu, 16 Jul 2020 11:46:18 +0000 (20:46 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sun, 19 Jul 2020 04:18:19 +0000 (13:18 +0900)
connection.c
statement.c

index 390832eaf101fba4a640d7c34cbf03a9e3604dde..070e043f23563eac7480767f68c4912ee8fda63a 100644 (file)
@@ -2340,7 +2340,9 @@ MYLOG(DETAIL_LOG_LEVEL, " ignored abort_on_conn\n");
 
    if (retres)
        QR_set_conn(retres, self);
-   return (QResultHold) {retres, res};
+   rhold.first = retres;
+   rhold.last = res;
+   return rhold;
 }
 
 #define MAX_SEND_FUNC_ARGS 3
index 721f7feeed25d9919868297301db497c19e360ad..9e5b411b1656e3767d25b79dcec0cfcf29975494 100644 (file)
@@ -378,7 +378,7 @@ SC_Constructor(ConnectionClass *conn)
    {
        rv->hdbc = conn;
        rv->phstmt = NULL;
-       rv->rhold = (QResultHold) {0};
+       rv->rhold.first = rv->rhold.last = NULL;
        rv->curres = NULL;
        rv->catalog_result = FALSE;
        rv->prepare = NON_PREPARE_STATEMENT;
@@ -528,7 +528,7 @@ SC_Destructor(StatementClass *self)
 void
 SC_init_Result(StatementClass *self)
 {
-   self->rhold = (QResultHold) {0};
+   self->rhold.first = self->rhold.last = NULL;
    self->curres = NULL;
    self->curr_param_result = 0;
    MYLOG(0, "leaving(%p)\n", self);
@@ -546,7 +546,8 @@ SC_set_Result(StatementClass *self, QResultClass *first)
        for (res = first; res; res = QR_nextr(res))
            last = res;
        self->curres = first;
-       self->rhold = (QResultHold) {first, last};
+       self->rhold.first = first;
+       self->rhold.last = last;
        if (NULL != first)
            self->curr_param_result = 1;
    }
@@ -2017,7 +2018,7 @@ SC_execute(StatementClass *self)
            }
            goto cleanup;
        }
-       rhold = (QResultHold) {first, first};
+       rhold.first = rhold.last = first;
    }
    else if (isSelectType)
    {