Skip to content
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
2 changes: 0 additions & 2 deletions ext/bz2/bz2.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,8 @@ static void php_bz2_error(INTERNAL_FUNCTION_PARAMETERS, int opt)
switch (opt) {
case PHP_BZ_ERRNO:
RETURN_LONG(errnum);
break;
case PHP_BZ_ERRSTR:
RETURN_STRING((char*)errstr);
break;
case PHP_BZ_ERRBOTH:
array_init(return_value);

Expand Down
3 changes: 0 additions & 3 deletions ext/calendar/calendar.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,11 @@ PHP_FUNCTION(jddayofweek)
switch (mode) {
case CAL_DOW_LONG:
RETURN_STRING(daynamel);
break;
case CAL_DOW_SHORT:
RETURN_STRING(daynames);
break;
case CAL_DOW_DAYNO:
default:
RETURN_LONG(day);
break;
}
}
/* }}} */
Expand Down
4 changes: 0 additions & 4 deletions ext/date/php_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -4266,10 +4266,8 @@ PHP_FUNCTION(timezone_offset_get)
break;
case TIMELIB_ZONETYPE_OFFSET:
RETURN_LONG(tzobj->tzi.utc_offset);
break;
case TIMELIB_ZONETYPE_ABBR:
RETURN_LONG(tzobj->tzi.z.utc_offset + (tzobj->tzi.z.dst * 3600));
break;
}
}
/* }}} */
Expand Down Expand Up @@ -5545,10 +5543,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, bool calc_s
case SUNFUNCS_RET_STRING:
retstr = strpprintf(0, "%02d:%02d", (int) N, (int) (60 * (N - (int) N)));
RETURN_NEW_STR(retstr);
break;
case SUNFUNCS_RET_DOUBLE:
RETURN_DOUBLE(N);
break;
}
}
/* }}} */
Expand Down
2 changes: 0 additions & 2 deletions ext/enchant/enchant.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,10 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
case PHP_ENCHANT_MYSPELL:
enchant_broker_set_param(pbroker->pbroker, "enchant.myspell.dictionary.path", value);
RETURN_TRUE;
break;

case PHP_ENCHANT_ISPELL:
enchant_broker_set_param(pbroker->pbroker, "enchant.ispell.dictionary.path", value);
RETURN_TRUE;
break;

default:
RETURN_FALSE;
Expand Down
1 change: 0 additions & 1 deletion ext/exif/exif.c
Original file line number Diff line number Diff line change
Expand Up @@ -4026,7 +4026,6 @@ static bool exif_scan_thumbnail(image_info_type *ImageInfo)
case M_EOI:
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Could not compute size of thumbnail");
return false;
break;

default:
/* just skip */
Expand Down
3 changes: 0 additions & 3 deletions ext/ffi/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,6 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp)
zend_hash_str_add(ht, "cdata", sizeof("cdata")-1, &tmp);
*is_temp = 1;
return ht;
break;
case ZEND_FFI_TYPE_POINTER:
if (*(void**)ptr == NULL) {
ZVAL_NULL(&tmp);
Expand Down Expand Up @@ -2145,7 +2144,6 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp)
// TODO: function name ???
*is_temp = 1;
return ht;
break;
default:
ZEND_UNREACHABLE();
break;
Expand Down Expand Up @@ -7084,7 +7082,6 @@ static zend_result zend_ffi_nested_type(zend_ffi_type *type, zend_ffi_type *nest
nested_type->size = nested_type->array.length * ZEND_FFI_TYPE(nested_type->array.type)->size;
nested_type->align = ZEND_FFI_TYPE(nested_type->array.type)->align;
return SUCCESS;
break;
case ZEND_FFI_TYPE_FUNC:
/* "char" is used as a terminator of nested declaration */
if (nested_type->func.ret_type == &zend_ffi_type_char) {
Expand Down
4 changes: 0 additions & 4 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,19 +764,15 @@ PHP_FUNCTION(imagecolormatch)
case -1:
zend_argument_value_error(1, "must be TrueColor");
RETURN_THROWS();
break;
case -2:
zend_argument_value_error(2, "must be Palette");
RETURN_THROWS();
break;
case -3:
zend_argument_value_error(2, "must be the same size as argument #1 ($im1)");
RETURN_THROWS();
break;
case -4:
zend_argument_value_error(2, "must have at least one color");
RETURN_THROWS();
break;
}

RETURN_TRUE;
Expand Down
5 changes: 0 additions & 5 deletions ext/intl/normalizer/normalizer_normalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,14 @@ static const UNormalizer2 *intl_get_normalizer(zend_long form, UErrorCode *err)
{
case NORMALIZER_FORM_C:
return unorm2_getNFCInstance(err);
break;
case NORMALIZER_FORM_D:
return unorm2_getNFDInstance(err);
break;
case NORMALIZER_FORM_KC:
return unorm2_getNFKCInstance(err);
break;
case NORMALIZER_FORM_KD:
return unorm2_getNFKDInstance(err);
break;
case NORMALIZER_FORM_KC_CF:
return unorm2_getNFKCCasefoldInstance(err);
break;
}

*err = U_ILLEGAL_ARGUMENT_ERROR;
Expand Down
1 change: 0 additions & 1 deletion ext/odbc/php_odbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,6 @@ PHP_FUNCTION(odbc_result)
}
ZSTR_VAL(field_str)[ZSTR_LEN(field_str)] = '\0';
RETURN_NEW_STR(field_str);
break;

default:
if (result->values[field_ind].vallen == SQL_NULL_DATA) {
Expand Down
2 changes: 0 additions & 2 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3323,15 +3323,13 @@ static zend_result accel_post_startup(void)
accel_startup_ok = false;
zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - cannot reattach to exiting shared memory.");
return SUCCESS;
break;
#if ENABLE_FILE_CACHE_FALLBACK
case ALLOC_FALLBACK:
zend_shared_alloc_lock();
file_cache_only = true;
fallback_process = true;
zend_shared_alloc_unlock();
goto file_cache_fallback;
break;
#endif
}

Expand Down
10 changes: 0 additions & 10 deletions ext/openssl/openssl_backend_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ const EVP_MD *php_openssl_get_evp_md_from_algo(zend_long algo)
#endif
default:
return NULL;
break;
}
return mdtype;
}
Expand All @@ -653,40 +652,31 @@ const EVP_CIPHER *php_openssl_get_evp_cipher_from_algo(zend_long algo)
#ifndef OPENSSL_NO_RC2
case PHP_OPENSSL_CIPHER_RC2_40:
return EVP_rc2_40_cbc();
break;
case PHP_OPENSSL_CIPHER_RC2_64:
return EVP_rc2_64_cbc();
break;
case PHP_OPENSSL_CIPHER_RC2_128:
return EVP_rc2_cbc();
break;
#endif

#ifndef OPENSSL_NO_DES
case PHP_OPENSSL_CIPHER_DES:
return EVP_des_cbc();
break;
case PHP_OPENSSL_CIPHER_3DES:
return EVP_des_ede3_cbc();
break;
#endif

#ifndef OPENSSL_NO_AES
case PHP_OPENSSL_CIPHER_AES_128_CBC:
return EVP_aes_128_cbc();
break;
case PHP_OPENSSL_CIPHER_AES_192_CBC:
return EVP_aes_192_cbc();
break;
case PHP_OPENSSL_CIPHER_AES_256_CBC:
return EVP_aes_256_cbc();
break;
#endif


default:
return NULL;
break;
}
}

Expand Down
2 changes: 0 additions & 2 deletions ext/openssl/xp_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,11 +2511,9 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val
case STREAM_XPORT_CRYPTO_OP_SETUP:
cparam->outputs.returncode = php_openssl_setup_crypto(stream, sslsock, cparam);
return PHP_STREAM_OPTION_RETURN_OK;
break;
case STREAM_XPORT_CRYPTO_OP_ENABLE:
cparam->outputs.returncode = php_openssl_enable_crypto(stream, sslsock, cparam);
return PHP_STREAM_OPTION_RETURN_OK;
break;
default:
/* fall through */
break;
Expand Down
1 change: 0 additions & 1 deletion ext/pcntl/pcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,6 @@ PHP_FUNCTION(pcntl_unshare)
case EINVAL:
zend_argument_value_error(1, "must be a combination of CLONE_* flags, or at least one flag is unsupported by the kernel");
RETURN_THROWS();
break;
#endif
#ifdef ENOMEM
case ENOMEM:
Expand Down
1 change: 0 additions & 1 deletion ext/pdo_firebird/firebird_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ static int php_firebird_preprocess(const zend_string* sql, char* sql_out, HashTa
case ttNone:
/* Execute statement preprocess SQL error */
return 0;
break;
}
}
return 1;
Expand Down
10 changes: 0 additions & 10 deletions ext/pgsql/pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,6 @@ PHP_FUNCTION(pg_query)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1351,7 +1350,6 @@ PHP_FUNCTION(pg_query_params)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1437,7 +1435,6 @@ PHP_FUNCTION(pg_prepare)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1536,7 +1533,6 @@ PHP_FUNCTION(pg_execute)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1648,7 +1644,6 @@ PHP_FUNCTION(pg_last_notice)
zend_hash_clean(notices);
}
RETURN_TRUE;
break;
default:
zend_argument_value_error(2, "must be one of PGSQL_NOTICE_LAST, PGSQL_NOTICE_ALL, or PGSQL_NOTICE_CLEAR");
RETURN_THROWS();
Expand Down Expand Up @@ -3401,7 +3396,6 @@ PHP_FUNCTION(pg_copy_to)
case -2:
PHP_PQ_ERROR("getline failed: %s", pgsql);
RETURN_FALSE;
break;
default:
add_next_index_string(return_value, csv);
PQfreemem(csv);
Expand All @@ -3420,7 +3414,6 @@ PHP_FUNCTION(pg_copy_to)
PQclear(pgsql_result);
PHP_PQ_ERROR("Copy command failed: %s", pgsql);
RETURN_FALSE;
break;
}
}
/* }}} */
Expand Down Expand Up @@ -3551,12 +3544,10 @@ PHP_FUNCTION(pg_copy_from)
RETURN_FALSE;
}
RETURN_TRUE;
break;
default:
PQclear(pgsql_result);
PHP_PQ_ERROR("Copy command failed: %s", pgsql);
RETURN_FALSE;
break;
}
}
/* }}} */
Expand Down Expand Up @@ -5793,7 +5784,6 @@ PHP_FUNCTION(pg_insert)
PHP_PQ_ERROR("Query failed: %s", pg_link);
PQclear(pg_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pg_result) {
Expand Down
1 change: 0 additions & 1 deletion ext/session/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,6 @@ PHPAPI zend_result php_session_start(void)
case php_session_active:
php_session_session_already_started_error(E_NOTICE, "Ignoring session_start() because a session has already been started");
return FAILURE;
break;

case php_session_disabled: {
const char *value = zend_ini_string(ZEND_STRL("session.save_handler"), false);
Expand Down
7 changes: 0 additions & 7 deletions ext/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,6 @@ PHP_FUNCTION(socket_getsockname)
ZEND_TRY_ASSIGN_REF_LONG(objint, htons(sin6->sin6_port));
}
RETURN_TRUE;
break;
#endif
case AF_INET:
sin = (struct sockaddr_in *) sa;
Expand All @@ -1044,14 +1043,12 @@ PHP_FUNCTION(socket_getsockname)
ZEND_TRY_ASSIGN_REF_LONG(objint, htons(sin->sin_port));
}
RETURN_TRUE;
break;

case AF_UNIX:
s_un = (struct sockaddr_un *) sa;

ZEND_TRY_ASSIGN_REF_STRING(addr, s_un->sun_path);
RETURN_TRUE;
break;
#ifdef AF_PACKET
case AF_PACKET:
sll = (struct sockaddr_ll *) sa;
Expand All @@ -1067,7 +1064,6 @@ PHP_FUNCTION(socket_getsockname)
ZEND_TRY_ASSIGN_REF_LONG(objint, sll->sll_ifindex);
}
RETURN_TRUE;
break;
#endif

default:
Expand Down Expand Up @@ -1123,7 +1119,6 @@ PHP_FUNCTION(socket_getpeername)
}

RETURN_TRUE;
break;
#endif
case AF_INET:
sin = (struct sockaddr_in *) sa;
Expand All @@ -1135,14 +1130,12 @@ PHP_FUNCTION(socket_getpeername)
}

RETURN_TRUE;
break;

case AF_UNIX:
s_un = (struct sockaddr_un *) sa;

ZEND_TRY_ASSIGN_REF_STRING(arg2, s_un->sun_path);
RETURN_TRUE;
break;

default:
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
Expand Down
1 change: 0 additions & 1 deletion ext/sqlite3/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,6 @@ PHP_METHOD(SQLite3Result, fetchArray)

case SQLITE_DONE:
RETURN_FALSE;
break;

default:
php_sqlite3_error(result_obj->db_obj, sqlite3_errcode(sqlite3_db_handle(result_obj->stmt_obj->stmt)), "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt)));
Expand Down
1 change: 0 additions & 1 deletion ext/standard/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ PHP_FUNCTION(count)
cnt = php_count_recursive(Z_ARRVAL_P(array));
}
RETURN_LONG(cnt);
break;
case IS_OBJECT: {
zval retval;
/* first, we check if the handler is defined */
Expand Down
Loading
Loading