Skip to content

Fix ISO C90 forbids mixed declarations and code warning#2334

Merged
MuhammadTahaNaveed merged 1 commit intoapache:masterfrom
jrgemignani:fix_2313_iso_warning
Feb 14, 2026
Merged

Fix ISO C90 forbids mixed declarations and code warning#2334
MuhammadTahaNaveed merged 1 commit intoapache:masterfrom
jrgemignani:fix_2313_iso_warning

Conversation

@jrgemignani
Copy link
Contributor

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

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
@github-actions github-actions bot added master override-stale To keep issues/PRs untouched from stale action labels Feb 13, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an ISO C90 compliance warning by moving a variable declaration to the beginning of a code block. The codebase follows the C90 standard which prohibits mixing declarations and code within the same block.

Changes:

  • Moved enum agtype_value_type elem_type declaration to the beginning of the for-loop block in the age_tostringlist function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MuhammadTahaNaveed MuhammadTahaNaveed merged commit fa91350 into apache:master Feb 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

master override-stale To keep issues/PRs untouched from stale action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants