Subject: Re: Build failure in cgdconfig.c
To: None <current-users@netbsd.org>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 02/06/2007 05:47:15
On Mon, 5 Feb 2007, Paul Goyette wrote:

> Just updated sources via CVS a few minutes ago - 2007-02-06 05:45 GMT
>
> /usr/src/sbin/cgdconfig/cgdconfig.c: In function 'opendisk_werror':
> /usr/src/sbin/cgdconfig/cgdconfig.c:572: warning: format '%d' expects type 
> 'int', but argument 4 has type 'size_t'
>
> This looks a lot like the one that bit me earlier today in init.c.
> Failure occurs on port-amd64 but not on port-i386

The following patch seems to work:

Index: cgdconfig.c
===================================================================
RCS file: /cvsroot/src/sbin/cgdconfig/cgdconfig.c,v
retrieving revision 1.17
diff -u -p -r1.17 cgdconfig.c
--- cgdconfig.c 6 Feb 2007 02:09:19 -0000       1.17
+++ cgdconfig.c 6 Feb 2007 13:45:55 -0000
@@ -569,7 +569,7 @@ opendisk_werror(const char *cgd, char *b
  {
         int     fd;

-       VPRINTF(3, ("opendisk_werror(%s, %s, %d) called.\n", cgd, buf, buflen));
+       VPRINTF(3, ("opendisk_werror(%s, %s, %zu) called.\n", cgd, buf, buflen));

         /* sanity */
         if (!cgd || !buf)




----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
|                  | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------