From 34861819bd160e2f0e035f7ec328d48755a1a942 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 5 Dec 2018 06:44:10 +0000 Subject: key.data is a void *, on gcc archs doing a %s printf with such a pointer results in a warning. Use either the original string value or use a cast. This makes both clang and gcc happy. OK guenther@ --- usr.sbin/ldapd/search.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.sbin/ldapd') diff --git a/usr.sbin/ldapd/search.c b/usr.sbin/ldapd/search.c index 85b3d2d2b86..8aed3a50245 100644 --- a/usr.sbin/ldapd/search.c +++ b/usr.sbin/ldapd/search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: search.c,v 1.23 2018/07/31 11:01:00 claudio Exp $ */ +/* $OpenBSD: search.c,v 1.24 2018/12/05 06:44:09 claudio Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk @@ -322,7 +322,8 @@ conn_search(struct search *search) if (search->plan->indexed) { search->cindx = TAILQ_FIRST(&search->plan->indices); key.data = search->cindx->prefix; - log_debug("init index scan on [%s]", key.data); + log_debug("init index scan on [%s]", + search->cindx->prefix); } else { if (*search->basedn) key.data = search->basedn; @@ -342,7 +343,8 @@ conn_search(struct search *search) op = BT_NEXT; if (rc == BT_SUCCESS && search->plan->indexed) { - log_debug("found index %.*s", (int)key.size, key.data); + log_debug("found index %.*s", (int)key.size, + (char *)key.data); if (!has_prefix(&key, search->cindx->prefix)) { log_debug("scanned past index prefix [%s]", @@ -362,7 +364,8 @@ conn_search(struct search *search) memset(&key, 0, sizeof(key)); key.data = search->cindx->prefix; key.size = strlen(key.data); - log_debug("re-init cursor on [%s]", key.data); + log_debug("re-init cursor on [%s]", + search->cindx->prefix); op = BT_CURSOR; continue; } -- cgit v1.2.3