Skip to content

Commit eca7441

Browse files
committed
remove unreachable breaks
1 parent e9bb1d2 commit eca7441

5 files changed

Lines changed: 0 additions & 24 deletions

File tree

ext/enchant/enchant.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,10 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
346346
case PHP_ENCHANT_MYSPELL:
347347
enchant_broker_set_param(pbroker->pbroker, "enchant.myspell.dictionary.path", value);
348348
RETURN_TRUE;
349-
break;
350349

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

356354
default:
357355
RETURN_FALSE;

ext/pgsql/pgsql.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,6 @@ PHP_FUNCTION(pg_query)
12121212
PHP_PQ_ERROR("Query failed: %s", pgsql);
12131213
PQclear(pgsql_result);
12141214
RETURN_FALSE;
1215-
break;
12161215
case PGRES_COMMAND_OK: /* successful command that did not return rows */
12171216
default:
12181217
if (pgsql_result) {
@@ -1351,7 +1350,6 @@ PHP_FUNCTION(pg_query_params)
13511350
PHP_PQ_ERROR("Query failed: %s", pgsql);
13521351
PQclear(pgsql_result);
13531352
RETURN_FALSE;
1354-
break;
13551353
case PGRES_COMMAND_OK: /* successful command that did not return rows */
13561354
default:
13571355
if (pgsql_result) {
@@ -1437,7 +1435,6 @@ PHP_FUNCTION(pg_prepare)
14371435
PHP_PQ_ERROR("Query failed: %s", pgsql);
14381436
PQclear(pgsql_result);
14391437
RETURN_FALSE;
1440-
break;
14411438
case PGRES_COMMAND_OK: /* successful command that did not return rows */
14421439
default:
14431440
if (pgsql_result) {
@@ -1536,7 +1533,6 @@ PHP_FUNCTION(pg_execute)
15361533
PHP_PQ_ERROR("Query failed: %s", pgsql);
15371534
PQclear(pgsql_result);
15381535
RETURN_FALSE;
1539-
break;
15401536
case PGRES_COMMAND_OK: /* successful command that did not return rows */
15411537
default:
15421538
if (pgsql_result) {
@@ -1648,7 +1644,6 @@ PHP_FUNCTION(pg_last_notice)
16481644
zend_hash_clean(notices);
16491645
}
16501646
RETURN_TRUE;
1651-
break;
16521647
default:
16531648
zend_argument_value_error(2, "must be one of PGSQL_NOTICE_LAST, PGSQL_NOTICE_ALL, or PGSQL_NOTICE_CLEAR");
16541649
RETURN_THROWS();
@@ -3401,7 +3396,6 @@ PHP_FUNCTION(pg_copy_to)
34013396
case -2:
34023397
PHP_PQ_ERROR("getline failed: %s", pgsql);
34033398
RETURN_FALSE;
3404-
break;
34053399
default:
34063400
add_next_index_string(return_value, csv);
34073401
PQfreemem(csv);
@@ -3420,7 +3414,6 @@ PHP_FUNCTION(pg_copy_to)
34203414
PQclear(pgsql_result);
34213415
PHP_PQ_ERROR("Copy command failed: %s", pgsql);
34223416
RETURN_FALSE;
3423-
break;
34243417
}
34253418
}
34263419
/* }}} */
@@ -3551,12 +3544,10 @@ PHP_FUNCTION(pg_copy_from)
35513544
RETURN_FALSE;
35523545
}
35533546
RETURN_TRUE;
3554-
break;
35553547
default:
35563548
PQclear(pgsql_result);
35573549
PHP_PQ_ERROR("Copy command failed: %s", pgsql);
35583550
RETURN_FALSE;
3559-
break;
35603551
}
35613552
}
35623553
/* }}} */
@@ -5793,7 +5784,6 @@ PHP_FUNCTION(pg_insert)
57935784
PHP_PQ_ERROR("Query failed: %s", pg_link);
57945785
PQclear(pg_result);
57955786
RETURN_FALSE;
5796-
break;
57975787
case PGRES_COMMAND_OK: /* successful command that did not return rows */
57985788
default:
57995789
if (pg_result) {

ext/sockets/sockets.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,6 @@ PHP_FUNCTION(socket_getsockname)
10331033
ZEND_TRY_ASSIGN_REF_LONG(objint, htons(sin6->sin6_port));
10341034
}
10351035
RETURN_TRUE;
1036-
break;
10371036
#endif
10381037
case AF_INET:
10391038
sin = (struct sockaddr_in *) sa;
@@ -1044,14 +1043,12 @@ PHP_FUNCTION(socket_getsockname)
10441043
ZEND_TRY_ASSIGN_REF_LONG(objint, htons(sin->sin_port));
10451044
}
10461045
RETURN_TRUE;
1047-
break;
10481046

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

10521050
ZEND_TRY_ASSIGN_REF_STRING(addr, s_un->sun_path);
10531051
RETURN_TRUE;
1054-
break;
10551052
#ifdef AF_PACKET
10561053
case AF_PACKET:
10571054
sll = (struct sockaddr_ll *) sa;
@@ -1067,7 +1064,6 @@ PHP_FUNCTION(socket_getsockname)
10671064
ZEND_TRY_ASSIGN_REF_LONG(objint, sll->sll_ifindex);
10681065
}
10691066
RETURN_TRUE;
1070-
break;
10711067
#endif
10721068

10731069
default:
@@ -1123,7 +1119,6 @@ PHP_FUNCTION(socket_getpeername)
11231119
}
11241120

11251121
RETURN_TRUE;
1126-
break;
11271122
#endif
11281123
case AF_INET:
11291124
sin = (struct sockaddr_in *) sa;
@@ -1135,14 +1130,12 @@ PHP_FUNCTION(socket_getpeername)
11351130
}
11361131

11371132
RETURN_TRUE;
1138-
break;
11391133

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

11431137
ZEND_TRY_ASSIGN_REF_STRING(arg2, s_un->sun_path);
11441138
RETURN_TRUE;
1145-
break;
11461139

11471140
default:
11481141
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");

ext/sqlite3/sqlite3.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,6 @@ PHP_METHOD(SQLite3Result, fetchArray)
20162016

20172017
case SQLITE_DONE:
20182018
RETURN_FALSE;
2019-
break;
20202019

20212020
default:
20222021
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)));

ext/standard/type.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ static zend_always_inline void _zend_is_numeric(zval *return_value, zval *arg)
350350
case IS_LONG:
351351
case IS_DOUBLE:
352352
RETURN_TRUE;
353-
break;
354353

355354
case IS_STRING:
356355
if (is_numeric_string(Z_STRVAL_P(arg), Z_STRLEN_P(arg), NULL, NULL, 0)) {
@@ -362,7 +361,6 @@ static zend_always_inline void _zend_is_numeric(zval *return_value, zval *arg)
362361

363362
default:
364363
RETURN_FALSE;
365-
break;
366364
}
367365
}
368366

@@ -404,11 +402,9 @@ PHP_FUNCTION(is_scalar)
404402
case IS_LONG:
405403
case IS_STRING:
406404
RETURN_TRUE;
407-
break;
408405

409406
default:
410407
RETURN_FALSE;
411-
break;
412408
}
413409
}
414410
/* }}} */

0 commit comments

Comments
 (0)