Skip to content

Remove more unused local variables #17688

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
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ext/com_dotnet/com_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ static void function_dtor(zval *zv)
static PHP_FUNCTION(com_method_handler)
{
zval *object = getThis();
zend_string *method = EX(func)->common.function_name;
zval *args = NULL;
php_com_dotnet_object *obj = CDNO_FETCH(object);
int nargs;
Expand Down
7 changes: 3 additions & 4 deletions ext/pdo_odbc/odbc_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,11 @@ static int pdo_odbc_utf82ucs2(pdo_stmt_t *stmt, int is_unicode, const char *buf,
return PDO_ODBC_CONV_NOT_REQUIRED;
}

static int pdo_odbc_ucs22utf8(pdo_stmt_t *stmt, int is_unicode, zval *result)
static int pdo_odbc_ucs22utf8(int is_unicode, zval *result)
{
#ifdef PHP_WIN32
ZEND_ASSERT(Z_TYPE_P(result) == IS_STRING);
if (is_unicode && Z_STRLEN_P(result) != 0) {
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
DWORD ret;

ret = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR) Z_STRVAL_P(result), Z_STRLEN_P(result)/sizeof(WCHAR), NULL, 0, NULL, NULL);
Expand Down Expand Up @@ -502,7 +501,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p

if (P->len >= 0) {
ZVAL_STRINGL(parameter, P->outbuf, P->len);
switch (pdo_odbc_ucs22utf8(stmt, P->is_unicode, parameter)) {
switch (pdo_odbc_ucs22utf8(P->is_unicode, parameter)) {
case PDO_ODBC_CONV_FAIL:
/* something fishy, but allow it to come back as binary */
case PDO_ODBC_CONV_NOT_REQUIRED:
Expand Down Expand Up @@ -751,7 +750,7 @@ static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, zval *result, enum pdo
}

unicode_conv:
switch (pdo_odbc_ucs22utf8(stmt, C->is_unicode, result)) {
switch (pdo_odbc_ucs22utf8(C->is_unicode, result)) {
case PDO_ODBC_CONV_FAIL:
/* oh well. They can have the binary version of it */
case PDO_ODBC_CONV_NOT_REQUIRED:
Expand Down
1 change: 0 additions & 1 deletion sapi/phpdbg/phpdbg_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ int mprotect(void *addr, size_t size, int protection) {

int phpdbg_exception_handler_win32(EXCEPTION_POINTERS *xp) {
EXCEPTION_RECORD *xr = xp->ExceptionRecord;
CONTEXT *xc = xp->ContextRecord;

switch (xr->ExceptionCode) {
case EXCEPTION_ACCESS_VIOLATION:
Expand Down