You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by jg...@apache.org on 2022/01/26 02:03:44 UTC

[incubator-age] branch master updated: hotfix: A C99 compliant declaration was used

This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-age.git


The following commit(s) were added to refs/heads/master by this push:
     new 89c7bbb  hotfix: A C99 compliant declaration was used
89c7bbb is described below

commit 89c7bbb8dd1d0c50c3924b73d9f3bc7b40095200
Author: John Gemignani <jr...@gmail.com>
AuthorDate: Tue Jan 25 17:59:39 2022 -0800

    hotfix: A C99 compliant declaration was used
    
    A C99 compliant declaration was used by mistake -
    
    In function ‘transform_cypher_optional_match_clause’:
    error: ‘for’ loop initial declarations are only allowed in C99 mode
    
    for (int i = list_length(pstate->p_joinexprs) + 1; i < j->rtindex; i++)
    
    This corrects that issue.
---
 src/backend/parser/cypher_clause.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/backend/parser/cypher_clause.c b/src/backend/parser/cypher_clause.c
index 3d04f5a..784b842 100644
--- a/src/backend/parser/cypher_clause.c
+++ b/src/backend/parser/cypher_clause.c
@@ -2091,6 +2091,7 @@ static RangeTblEntry *transform_cypher_optional_match_clause(cypher_parsestate *
     List *res_colnames = NIL, *res_colvars = NIL;
     Alias *l_alias, *r_alias;
     ParseNamespaceItem *nsitem;
+    int i = 0;
 
     j->jointype = JOIN_LEFT;
 
@@ -2124,7 +2125,7 @@ static RangeTblEntry *transform_cypher_optional_match_clause(cypher_parsestate *
 
     j->rtindex = RTERangeTablePosn(pstate, rte, NULL);
 
-    for (int i = list_length(pstate->p_joinexprs) + 1; i < j->rtindex; i++)
+    for (i = list_length(pstate->p_joinexprs) + 1; i < j->rtindex; i++)
         pstate->p_joinexprs = lappend(pstate->p_joinexprs, NULL);
     pstate->p_joinexprs = lappend(pstate->p_joinexprs, j);
     Assert(list_length(pstate->p_joinexprs) == j->rtindex);