@@ -202,7 +202,11 @@ PHPAPI char* spl_filesystem_object_get_path(spl_filesystem_object *intern, size_
202
202
203
203
static inline int spl_filesystem_object_get_file_name (spl_filesystem_object * intern ) /* {{{ */
204
204
{
205
+ /* On UNIX based systems '/' is identical to DEFAULT_SLASH */
206
+ #pragma GCC diagnostic push
207
+ #pragma GCC diagnostic ignored "-Wduplicated-branches"
205
208
char slash = SPL_HAS_FLAG (intern -> flags , SPL_FILE_DIR_UNIXPATHS ) ? '/' : DEFAULT_SLASH ;
209
+ #pragma GCC diagnostic pop
206
210
207
211
switch (intern -> type ) {
208
212
case SPL_FS_INFO :
@@ -1481,7 +1485,11 @@ PHP_METHOD(RecursiveDirectoryIterator, getChildren)
1481
1485
zval zpath , zflags ;
1482
1486
spl_filesystem_object * intern = Z_SPLFILESYSTEM_P (ZEND_THIS );
1483
1487
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"
1484
1491
char slash = SPL_HAS_FLAG (intern -> flags , SPL_FILE_DIR_UNIXPATHS ) ? '/' : DEFAULT_SLASH ;
1492
+ #pragma GCC diagnostic pop
1485
1493
1486
1494
if (zend_parse_parameters_none () == FAILURE ) {
1487
1495
RETURN_THROWS ();
@@ -1532,7 +1540,11 @@ PHP_METHOD(RecursiveDirectoryIterator, getSubPath)
1532
1540
PHP_METHOD (RecursiveDirectoryIterator , getSubPathname )
1533
1541
{
1534
1542
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"
1535
1546
char slash = SPL_HAS_FLAG (intern -> flags , SPL_FILE_DIR_UNIXPATHS ) ? '/' : DEFAULT_SLASH ;
1547
+ #pragma GCC diagnostic pop
1536
1548
1537
1549
if (zend_parse_parameters_none () == FAILURE ) {
1538
1550
RETURN_THROWS ();
0 commit comments