Skip to content

Commit 34585aa

Browse files
committed
Suppress duplicated-branches compiler warning in pack implementation
1 parent ddedad2 commit 34585aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/standard/pack.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,11 +1101,15 @@ PHP_FUNCTION(unpack)
11011101

11021102
v = php_unpack(&input[inputpos], 8, issigned, map);
11031103

1104+
/* GCC seems to think does are identical for some reason */
1105+
#pragma GCC diagnostic push
1106+
#pragma GCC diagnostic ignored "-Wduplicated-branches"
11041107
if (type == 'q') {
11051108
v = (zend_long) v;
11061109
} else {
11071110
v = (zend_ulong) v;
11081111
}
1112+
#pragma GCC diagnostic pop
11091113

11101114
add_assoc_long(return_value, n, v);
11111115
break;

0 commit comments

Comments
 (0)