Skip to content

Fix unused variable warning when using libpq < 12 #14630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

petk
Copy link
Member

@petk petk commented Jun 21, 2024

The variable S is not used if PQresultMemorySize is not available in this switch at this point.

The variable S is not used if PQresultMemorySize is not available in
this switch at this point.
@@ -727,6 +727,7 @@ static int pgsql_stmt_get_attr(pdo_stmt_t *stmt, zend_long attr, zval *val)
#endif

default:
(void)S;
Copy link
Member

Choose a reason for hiding this comment

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

makes sense, we could have created the var only for the case above but one day we might add more attributes to fetch.

@petk petk merged commit 678a481 into php:master Jun 21, 2024
9 of 11 checks passed
@petk petk deleted the patch-pgsql-unused-variable branch June 21, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants