Skip to content

Commit 4373c60

Browse files
authored
Remove more unused local variables (GH-17688)
Since `pdo_odbc_ucs22utf8()` doesn't actually use the `stmt`, we drop this parameter as well.
1 parent 1879ec1 commit 4373c60

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

ext/com_dotnet/com_handlers.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ static void function_dtor(zval *zv)
249249
static PHP_FUNCTION(com_method_handler)
250250
{
251251
zval *object = getThis();
252-
zend_string *method = EX(func)->common.function_name;
253252
zval *args = NULL;
254253
php_com_dotnet_object *obj = CDNO_FETCH(object);
255254
int nargs;

ext/pdo_odbc/odbc_stmt.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ static int pdo_odbc_utf82ucs2(pdo_stmt_t *stmt, int is_unicode, const char *buf,
8888
return PDO_ODBC_CONV_NOT_REQUIRED;
8989
}
9090

91-
static int pdo_odbc_ucs22utf8(pdo_stmt_t *stmt, int is_unicode, zval *result)
91+
static int pdo_odbc_ucs22utf8(int is_unicode, zval *result)
9292
{
9393
#ifdef PHP_WIN32
9494
ZEND_ASSERT(Z_TYPE_P(result) == IS_STRING);
9595
if (is_unicode && Z_STRLEN_P(result) != 0) {
96-
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
9796
DWORD ret;
9897

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

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

753752
unicode_conv:
754-
switch (pdo_odbc_ucs22utf8(stmt, C->is_unicode, result)) {
753+
switch (pdo_odbc_ucs22utf8(C->is_unicode, result)) {
755754
case PDO_ODBC_CONV_FAIL:
756755
/* oh well. They can have the binary version of it */
757756
case PDO_ODBC_CONV_NOT_REQUIRED:

sapi/phpdbg/phpdbg_win.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ int mprotect(void *addr, size_t size, int protection) {
2626

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

3130
switch (xr->ExceptionCode) {
3231
case EXCEPTION_ACCESS_VIOLATION:

0 commit comments

Comments
 (0)