Fix ISO C90 forbids mixed declarations and code warning#2334
Merged
MuhammadTahaNaveed merged 1 commit intoapache:masterfrom Feb 14, 2026
Merged
Fix ISO C90 forbids mixed declarations and code warning#2334MuhammadTahaNaveed merged 1 commit intoapache:masterfrom
MuhammadTahaNaveed merged 1 commit intoapache:masterfrom
Conversation
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
There was a problem hiding this comment.
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_typedeclaration to the beginning of the for-loop block in theage_tostringlistfunction
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MuhammadTahaNaveed
approved these changes
Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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