Skip to content

Fix unused variable in pdo_sqlite_stmt_set_attribute()#18851

Merged
iluuu1994 merged 1 commit into
php:masterfrom
iluuu1994:pdo_sqlite-unused-var
Jun 14, 2025
Merged

Fix unused variable in pdo_sqlite_stmt_set_attribute()#18851
iluuu1994 merged 1 commit into
php:masterfrom
iluuu1994:pdo_sqlite-unused-var

Conversation

@iluuu1994
Copy link
Copy Markdown
Member

The indentation is also wrong (using spaces instead of tabs), but this should be fixed in a separate commit.

See https://github.com/php/php-src/actions/runs/15647022368/job/44086182043

The indentation is also wrong (using spaces instead of tabs), but this should be
fixed in a separate commit.
return 0;
}

pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The cast is also not necessary here.

Suggested change
pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data;
pdo_sqlite_stmt *S = stmt->driver_data;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Technically not, but casting void* is somewhat of a personal preference. It's there for all other usages of driver_data in this file, so we should probably stay consistent.

@iluuu1994 iluuu1994 merged commit 0a9697f into php:master Jun 14, 2025
9 checks passed
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.

3 participants