Skip to content

Commit 577bc61

Browse files
committed
Revert "Suppress duplicated-branches compiler warning in SPL"
This reverts commit ddedad2.
1 parent b2b2ed9 commit 577bc61

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

ext/spl/spl_directory.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,7 @@ PHPAPI char* spl_filesystem_object_get_path(spl_filesystem_object *intern, size_
202202

203203
static inline int spl_filesystem_object_get_file_name(spl_filesystem_object *intern) /* {{{ */
204204
{
205-
/* On UNIX based systems '/' is identical to DEFAULT_SLASH */
206-
#pragma GCC diagnostic push
207-
#pragma GCC diagnostic ignored "-Wduplicated-branches"
208205
char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH;
209-
#pragma GCC diagnostic pop
210206

211207
switch (intern->type) {
212208
case SPL_FS_INFO:
@@ -1485,11 +1481,7 @@ PHP_METHOD(RecursiveDirectoryIterator, getChildren)
14851481
zval zpath, zflags;
14861482
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS);
14871483
spl_filesystem_object *subdir;
1488-
/* On UNIX based systems '/' is identical to DEFAULT_SLASH */
1489-
#pragma GCC diagnostic push
1490-
#pragma GCC diagnostic ignored "-Wduplicated-branches"
14911484
char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH;
1492-
#pragma GCC diagnostic pop
14931485

14941486
if (zend_parse_parameters_none() == FAILURE) {
14951487
RETURN_THROWS();
@@ -1540,11 +1532,7 @@ PHP_METHOD(RecursiveDirectoryIterator, getSubPath)
15401532
PHP_METHOD(RecursiveDirectoryIterator, getSubPathname)
15411533
{
15421534
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS);
1543-
/* On UNIX based systems '/' is identical to DEFAULT_SLASH */
1544-
#pragma GCC diagnostic push
1545-
#pragma GCC diagnostic ignored "-Wduplicated-branches"
15461535
char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH;
1547-
#pragma GCC diagnostic pop
15481536

15491537
if (zend_parse_parameters_none() == FAILURE) {
15501538
RETURN_THROWS();

0 commit comments

Comments
 (0)