You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2023/10/31 07:43:04 UTC
(qpid-proton) 02/02: PROTON-2772: disable -wcast-function-type warning
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit 058dcaa83a7e96e6f169e38750a05c51915800e8
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Sat Oct 14 13:13:01 2023 +0200
PROTON-2772: disable -wcast-function-type warning
This is a notorious problem where passing in function handles
inevitably results in this kind of unsafe casting.
---
c/src/sasl/cyrus_sasl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/c/src/sasl/cyrus_sasl.c b/c/src/sasl/cyrus_sasl.c
index 62d34272b..b4acafa3d 100644
--- a/c/src/sasl/cyrus_sasl.c
+++ b/c/src/sasl/cyrus_sasl.c
@@ -24,6 +24,7 @@
#include "core/logger_private.h"
+#include "proton/annotations.h"
#include "proton/sasl.h"
#include "proton/sasl_plugin.h"
#include "proton/transport.h"
@@ -187,10 +188,13 @@ static int pni_authorize(sasl_conn_t *conn,
return SASL_OK;
}
+PN_PUSH_WARNING
+PN_GNU_DISABLE_WARNING("-Wcast-function-type")
static const sasl_callback_t pni_server_callbacks[] = {
{SASL_CB_PROXY_POLICY, (int(*)(void)) pni_authorize, NULL},
{SASL_CB_LIST_END, NULL, NULL},
};
+PN_POP_WARNING
// Machinery to initialise the cyrus library only once even in a multithreaded environment
// Relies on pthreads.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org