]> granicus.if.org Git - php/commitdiff
Suppress deprecation warning on IDNA2003 ICU methods
authorSara Golemon <pollita@php.net>
Fri, 16 Aug 2019 16:40:20 +0000 (12:40 -0400)
committerSara Golemon <pollita@php.net>
Fri, 16 Aug 2019 16:40:20 +0000 (12:40 -0400)
ext/intl/idn/idn.c

index adfa81f02622337a2cacfa5d9b33c52bf46d808a..877a27cbe8a7d2b6746758f08c193222510539a1 100644 (file)
@@ -223,11 +223,18 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
                UParseError parse_error;
 
                status = U_ZERO_ERROR;
+#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
                if (mode == INTL_IDN_TO_ASCII) {
                        converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
                } else {
                        converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
                }
+#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
+# pragma GCC diagnostic pop
+#endif
                efree(ustring);
 
                if (U_FAILURE(status)) {