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

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


The following commit(s) were added to refs/heads/master by this push:
     new fa91350b Fix ISO C90 forbids mixed declarations and code warning 
(#2334)
fa91350b is described below

commit fa91350b0a524e596e4fc85c9086565c60c00548
Author: John Gemignani <[email protected]>
AuthorDate: Fri Feb 13 23:24:54 2026 -0800

    Fix ISO C90 forbids mixed declarations and code warning (#2334)
    
    Fixed the following ISO C90 warning -
    
    src/backend/utils/adt/agtype.c:7503:9: warning: ISO C90 forbids mixed 
declarations
    and code [-Wdeclaration-after-statement]
     7503 |         enum agtype_value_type elem_type = elem ? elem->type : 
AGTV_NULL;
          |         ^~~~
    
    No regression tests impacted.
    
    modified:   src/backend/utils/adt/agtype.c
---
 src/backend/utils/adt/agtype.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/backend/utils/adt/agtype.c b/src/backend/utils/adt/agtype.c
index 2526f41f..c0c54e5a 100644
--- a/src/backend/utils/adt/agtype.c
+++ b/src/backend/utils/adt/agtype.c
@@ -7498,9 +7498,11 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
     for (i = 0; i < count; i++)
     {
         /* TODO: check element's type, it's value, and convert it to string if 
possible. */
+        enum agtype_value_type elem_type;
+
         elem = get_ith_agtype_value_from_container(&agt_arg->root, i);
         string_elem.type = AGTV_STRING;
-        enum agtype_value_type elem_type = elem ? elem->type : AGTV_NULL;
+        elem_type = elem ? elem->type : AGTV_NULL;
 
         switch (elem_type)
         {

Reply via email to