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 - fix ldap_parse_page_control() check
Date: Wed, 20 Mar 2024 11:59:49 +1100	[thread overview]
Message-ID: <20240320005949.2661-1-ddiss@suse.de> (raw)

The final @cookie parameter should be a struct berval ** type. The
check currently fails when -Werror=incompatible-pointer-types is set:

conftest.c: In function 'main':
conftest.c:54:47: error: passing argument 4 of 'ldap_parse_page_control'
from incompatible pointer type [-Werror=incompatible-pointer-types]
   54 |       ret = ldap_parse_page_control(ld,clp,ct,c);
      |                                               ^
      |                                               |
      |                                               struct berval *
In file included from /usr/include/lber_types.h:24,
                 from /usr/include/lber.h:29,
                 from /usr/include/ldap.h:30,
                 from conftest.c:45:
/usr/include/ldap.h:2155:25: note: expected 'struct berval **' but
argument is of type 'struct berval *'
 2155 | ldap_parse_page_control LDAP_P((

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 aclocal.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 1046d72..fa18eb1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -424,7 +424,7 @@ AC_LINK_IFELSE(
       #include <ldap.h> ]],
    [[ LDAP *ld;
       ber_int_t *ct;
-      struct berval *c;
+      struct berval **c;
       int ret;
       LDAPControl **clp;
       ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
-- 
2.35.3


             reply	other threads:[~2024-03-20  1:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  0:59 David Disseldorp [this message]
2024-03-20  3:43 ` [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check Ian Kent
2024-04-16 14:23   ` David Disseldorp
2024-04-17  3:10     ` Ian Kent
2024-03-20  7:51 ` Paul Menzel
2024-03-21  0:01   ` 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=20240320005949.2661-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).