Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 2020 17:35:59 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r364084 - in stable: 10/usr.sbin/yp_mkdb 11/usr.sbin/yp_mkdb 12/usr.sbin/yp_mkdb 9/usr.sbin/yp_mkdb
Message-ID:  <202008101735.07AHZx9C056577@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon Aug 10 17:35:58 2020
New Revision: 364084
URL: https://svnweb.freebsd.org/changeset/base/364084

Log:
  MFC r363988:
  
  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);
                      ^~~~~~~~~

Modified:
  stable/11/usr.sbin/yp_mkdb/yp_mkdb.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/yp_mkdb/yp_mkdb.c
  stable/12/usr.sbin/yp_mkdb/yp_mkdb.c
  stable/9/usr.sbin/yp_mkdb/yp_mkdb.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/yp_mkdb/   (props changed)

Modified: stable/11/usr.sbin/yp_mkdb/yp_mkdb.c
==============================================================================
--- stable/11/usr.sbin/yp_mkdb/yp_mkdb.c	Mon Aug 10 17:01:59 2020	(r364083)
+++ stable/11/usr.sbin/yp_mkdb/yp_mkdb.c	Mon Aug 10 17:35:58 2020	(r364084)
@@ -86,8 +86,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?202008101735.07AHZx9C056577>