1b5975d6bSopenharmony_ciFrom 0f869ec5c6bc6cd37a6803cc2299a5845199e758 Mon Sep 17 00:00:00 2001 2b5975d6bSopenharmony_ciFrom: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> 3b5975d6bSopenharmony_ciDate: Wed, 21 Sep 2022 11:33:14 +0200 4b5975d6bSopenharmony_ciSubject: [PATCH] regex: Use critical messages if an unexpected NULL parameter 5b5975d6bSopenharmony_ci is provided 6b5975d6bSopenharmony_ci 7b5975d6bSopenharmony_ciAs programmer error we should be consistent in using criticals. 8b5975d6bSopenharmony_ci 9b5975d6bSopenharmony_ciConflict:NA 10b5975d6bSopenharmony_ciReference:https://gitlab.gnome.org/GNOME/glib/-/commit/06caf952e48dbed40b5dcff01a94f57ba079b526c 11b5975d6bSopenharmony_ci 12b5975d6bSopenharmony_ci--- 13b5975d6bSopenharmony_ci glib/gregex.c | 2 +- 14b5975d6bSopenharmony_ci 1 file changed, 1 insertion(+), 1 deletion(-) 15b5975d6bSopenharmony_ci 16b5975d6bSopenharmony_cidiff --git a/glib/gregex.c b/glib/gregex.c 17b5975d6bSopenharmony_ciindex fcc28d62f4..1baa4e2f18 100644 18b5975d6bSopenharmony_ci--- a/glib/gregex.c 19b5975d6bSopenharmony_ci+++ b/glib/gregex.c 20b5975d6bSopenharmony_ci@@ -483,7 +483,7 @@ translate_match_error (gint errcode) 21b5975d6bSopenharmony_ci break; 22b5975d6bSopenharmony_ci case PCRE2_ERROR_NULL: 23b5975d6bSopenharmony_ci /* NULL argument, this should not happen in GRegex */ 24b5975d6bSopenharmony_ci- g_warning ("A NULL argument was passed to PCRE"); 25b5975d6bSopenharmony_ci+ g_critical ("A NULL argument was passed to PCRE"); 26b5975d6bSopenharmony_ci break; 27b5975d6bSopenharmony_ci case PCRE2_ERROR_BADOPTION: 28b5975d6bSopenharmony_ci return "bad options"; 29b5975d6bSopenharmony_ci-- 30b5975d6bSopenharmony_ciGitLab 31b5975d6bSopenharmony_ci 32