Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Aug 2020 20:31:50 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363988 - head/usr.sbin/yp_mkdb
Message-ID:  <202008062031.076KVoRt002692@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu Aug  6 20:31:50 2020
New Revision: 363988
URL: https://svnweb.freebsd.org/changeset/base/363988

Log:
  Fix clang 11 -Wformat warnings in yp_mkdb:
  
  usr.sbin/yp_mkdb/yp_mkdb.c:91:40: error: format specifies type 'char *' but the argument has type 'void *' [-Werror,-Wformat]
                  printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size,
                          ~~~~                         ^~~~~~~~
  usr.sbin/yp_mkdb/yp_mkdb.c:92:7: error: format specifies type 'char *' but the argument has type 'void *' [-Werror,-Wformat]
                      data.data);
                      ^~~~~~~~~
  
  MFC after:	3 days

Modified:
  head/usr.sbin/yp_mkdb/yp_mkdb.c

Modified: head/usr.sbin/yp_mkdb/yp_mkdb.c
==============================================================================
--- head/usr.sbin/yp_mkdb/yp_mkdb.c	Thu Aug  6 19:34:55 2020	(r363987)
+++ head/usr.sbin/yp_mkdb/yp_mkdb.c	Thu Aug  6 20:31:50 2020	(r363988)
@@ -88,8 +88,8 @@ unwind(char *map)
 
 	key.data = NULL;
 	while (yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE)
-		printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size,
-		    data.data);
+		printf("%.*s %.*s\n", (int)key.size, (char *)key.data,
+		    (int)data.size, (char *)data.data);
 
 	(void)(dbp->close)(dbp);
 	return;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008062031.076KVoRt002692>