From 3ea2ac37e95116c0f1834b669430e08eb98361e5 Mon Sep 17 00:00:00 2001 From: chenxiaobin19 <1025221611@qq.com> Date: Mon, 21 Mar 2022 20:17:02 +0800 Subject: [PATCH] fix unnecessage warning --- contrib/security_plugin/gs_policy_plugin.cpp | 4 ---- src/gausskernel/dbmind/kernel/hypopg_index.cpp | 4 ---- src/gausskernel/process/tcop/auditfuncs.cpp | 4 ---- 3 files changed, 12 deletions(-) diff --git a/contrib/security_plugin/gs_policy_plugin.cpp b/contrib/security_plugin/gs_policy_plugin.cpp index 226251ad6..fe0f8d141 100644 --- a/contrib/security_plugin/gs_policy_plugin.cpp +++ b/contrib/security_plugin/gs_policy_plugin.cpp @@ -1828,10 +1828,6 @@ void install_label_hook() */ void set_gsaudit_prehook(ProcessUtility_hook_type func) { - if (next_ProcessUtility_hook != NULL) { - ereport(WARNING, (errmsg("next_ProcessUtility_hook in security_plugin cannot be set since it's not null"))); - return; - } next_ProcessUtility_hook = func; } diff --git a/src/gausskernel/dbmind/kernel/hypopg_index.cpp b/src/gausskernel/dbmind/kernel/hypopg_index.cpp index af40c4d60..62fad5d84 100644 --- a/src/gausskernel/dbmind/kernel/hypopg_index.cpp +++ b/src/gausskernel/dbmind/kernel/hypopg_index.cpp @@ -110,10 +110,6 @@ void InitHypopg() */ void set_hypopg_prehook(ProcessUtility_hook_type func) { - if (prev_utility_hook != NULL) { - ereport(WARNING, (errmsg("prev_utility_hook in hypopg cannot be set since it's not null"))); - return; - } prev_utility_hook = func; } diff --git a/src/gausskernel/process/tcop/auditfuncs.cpp b/src/gausskernel/process/tcop/auditfuncs.cpp index e270056ee..40f7c47ac 100644 --- a/src/gausskernel/process/tcop/auditfuncs.cpp +++ b/src/gausskernel/process/tcop/auditfuncs.cpp @@ -130,10 +130,6 @@ static const int g_auditFuncMapNum = sizeof(g_auditFuncMap) / sizeof(AuditFuncMa */ void set_pgaudit_prehook(ProcessUtility_hook_type func) { - if (prev_ProcessUtility != NULL) { - ereport(WARNING, (errmsg("prev_ProcessUtility in pgaudit cannot be set since it's not null"))); - return; - } prev_ProcessUtility = func; }