fix a few violations of ISO C90 (mixed code/declarations)
authorTomas Vondra <[email protected]>
Tue, 1 Mar 2016 02:36:41 +0000 (03:36 +0100)
committerPavan Deolasee <[email protected]>
Fri, 11 Mar 2016 06:24:40 +0000 (11:54 +0530)
Interestingly ';;' confuses the compiler enough to emit this warning.

src/backend/optimizer/plan/createplan.c
src/gtm/main/gtm_txn.c

index 2e1e234a3271d37850c1c6714ff8eb3f651d0f78..fb558376a05098e75e351cc28e5b25f149fd43c2 100644 (file)
@@ -1308,8 +1308,11 @@ find_push_down_plan_int(PlannerInfo *root, Plan *plan, bool force, bool delete,
                 */
                if ((((Plan *)remote_plan) == subplan) && parent)
                {
+                       RelOptInfo *rel = NULL;
+
                        Assert(root);
-                       RelOptInfo *rel = find_base_rel(root, ((SubqueryScan *)plan)->scan.scanrelid);
+
+                       rel = find_base_rel(root, ((SubqueryScan *)plan)->scan.scanrelid);
                        rel->subplan = ((SubqueryScan *)plan)->subplan;
                }
                return remote_plan;
index 21d73b8576e6fba83a41b6672caaefe9a20fec26..ed971351efad2cbe22ebe58e1a54ee5b49aa4314 100644 (file)
@@ -887,7 +887,7 @@ GTM_BkupBeginTransactionMulti(GTM_IsolationLevel *isolevel,
                                                          GTMProxy_ConnID *connid,
                                                          int   txn_count)
 {
-       GTM_TransactionHandle txn[GTM_MAX_GLOBAL_TRANSACTIONS];;
+       GTM_TransactionHandle txn[GTM_MAX_GLOBAL_TRANSACTIONS];
        MemoryContext oldContext;
        int count;
 
@@ -1393,7 +1393,7 @@ GTM_BkupBeginTransactionGetGXIDMulti(GlobalTransactionId *gxid,
                                                                         GTMProxy_ConnID *connid,
                                                                         int txn_count)
 {
-       GTM_TransactionHandle txn[GTM_MAX_GLOBAL_TRANSACTIONS];;
+       GTM_TransactionHandle txn[GTM_MAX_GLOBAL_TRANSACTIONS];
        GTM_TransactionInfo *gtm_txninfo;
        int ii;
        int count;