Skip to content

Commit adfc720

Browse files
committed
Use pragmas to shut-up GCC about a compiler warning
1 parent be2648d commit adfc720

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_operators.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,10 +809,15 @@ ZEND_API void ZEND_FASTCALL convert_to_object(zval *op) /* {{{ */
809809
}
810810
/* }}} */
811811

812+
/* Shut-up GCC for our custom format specifier */
813+
_Pragma("GCC diagnostic push")
814+
_Pragma("GCC diagnostic ignored \"-Wformat-invalid-specifier\"")
815+
_Pragma("GCC diagnostic ignored \"-Wformat-extra-args\"")
812816
void zend_incompatible_double_to_long_error(double d)
813817
{
814818
zend_error(E_DEPRECATED, "Implicit conversion from non-compatible float %.*H to int", -1, d);
815819
}
820+
_Pragma("GCC diagnostic pop")
816821

817822
ZEND_API zend_long ZEND_FASTCALL zval_get_long_func(zval *op, bool is_strict) /* {{{ */
818823
{

0 commit comments

Comments
 (0)