summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2019-08-16 12:40:20 -0400
committerSara Golemon <pollita@php.net>2019-08-16 12:40:20 -0400
commit725f439778a6397267fbb4e88059d704cccbc7f3 (patch)
treedbadfb293d9f59c9d71700f171d6bd4e05739431
parentfcabe7e5e44067319f9c4123d71a7cea6a823af4 (diff)
downloadphp-git-725f439778a6397267fbb4e88059d704cccbc7f3.tar.gz
Suppress deprecation warning on IDNA2003 ICU methods
-rw-r--r--ext/intl/idn/idn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index adfa81f026..877a27cbe8 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -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)) {