Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion ext/gd/libgd/gd_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@ static int bmp_read_direct(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, b
}
BMP_DEBUG(printf("Currently no bitfield support\n"));
return 1;
break;

case BMP_BI_RLE8:
if (info->depth != 8) {
Expand Down
1 change: 0 additions & 1 deletion ext/gd/libgd/gd_interpolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,6 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
switch (src->interpolation_id) {
case GD_NEAREST_NEIGHBOUR:
return gdImageRotateNearestNeighbour(src, angle, bgcolor);
break;

case GD_BILINEAR_FIXED:
case GD_BICUBIC_FIXED:
Expand Down
5 changes: 0 additions & 5 deletions ext/gd/libgd/gd_jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,23 +111,18 @@ const char * gdJpegGetVersionString()
switch(JPEG_LIB_VERSION) {
case 62:
return "6b";
break;

case 70:
return "7";
break;

case 80:
return "8";
break;

case 90:
return "9 compatible";
break;

case 100:
return "10 compatible";
break;

default:
return "unknown";
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/pcre/pcre2lib/sljit/sljitNativeRISCV_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,6 @@ static sljit_ins get_jump_instruction(sljit_s32 type)
case SLJIT_ORDERED_GREATER_EQUAL:
case SLJIT_ORDERED:
return BEQ | RS1(OTHER_FLAG) | RS2(TMP_ZERO);
break;
case SLJIT_GREATER_EQUAL:
case SLJIT_LESS_EQUAL:
case SLJIT_SIG_GREATER_EQUAL:
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
Loading
Loading