autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: autofs@vger.kernel.org
Cc: David Disseldorp <ddiss@suse.de>
Subject: [PATCH] autofs-5.1.9 - cast sasl_callback_t function pointers
Date: Thu, 21 Mar 2024 12:39:47 +1100	[thread overview]
Message-ID: <20240321013947.31673-1-ddiss@suse.de> (raw)

GCC 14+ uses -Werror=incompatible-pointer-types by default.
sasl.h:sasl_callback_t doesn't offer a type-safe mechanism for setting
@proc callback functions, so a cast is necessary.

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 modules/cyrus-sasl.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c
index e742eaf..107e182 100644
--- a/modules/cyrus-sasl.c
+++ b/modules/cyrus-sasl.c
@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **);
 static int getuser_func(void *, int, const char **, unsigned *);
 
 static sasl_callback_t callbacks[] = {
-	{ SASL_CB_USER, &getuser_func, NULL },
-	{ SASL_CB_AUTHNAME, &getuser_func, NULL },
-	{ SASL_CB_PASS, &getpass_func, NULL },
+	{ SASL_CB_USER, (int (*)(void))&getuser_func, NULL },
+	{ SASL_CB_AUTHNAME, (int (*)(void))&getuser_func, NULL },
+	{ SASL_CB_PASS, (int (*)(void))&getpass_func, NULL },
 	{ SASL_CB_LIST_END, NULL, NULL },
 };
 
 static sasl_callback_t debug_callbacks[] = {
-	{ SASL_CB_LOG, &sasl_log_func, NULL },
-	{ SASL_CB_USER, &getuser_func, NULL },
-	{ SASL_CB_AUTHNAME, &getuser_func, NULL },
-	{ SASL_CB_PASS, &getpass_func, NULL },
+	{ SASL_CB_LOG, (int (*)(void))&sasl_log_func, NULL },
+	{ SASL_CB_USER, (int (*)(void))&getuser_func, NULL },
+	{ SASL_CB_AUTHNAME, (int (*)(void))&getuser_func, NULL },
+	{ SASL_CB_PASS, (int (*)(void))&getpass_func, NULL },
 	{ SASL_CB_LIST_END, NULL, NULL },
 };
 
-- 
2.35.3


             reply	other threads:[~2024-03-21  1:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  1:39 David Disseldorp [this message]
2024-04-16 14:27 ` [PATCH] autofs-5.1.9 - cast sasl_callback_t function pointers David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240321013947.31673-1-ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=autofs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).