Thus spake Kris Kennaway <[EMAIL PROTECTED]>:
> On Mon, Dec 30, 2002 at 03:21:22AM +0000, Mike Barcroft wrote:
> 
> > ===> sbin/swapon
> > cc1: warnings being treated as errors
> > /tinderbox/sparc64/src/sbin/swapon/swapon.c: In function `swaplist':
> > /tinderbox/sparc64/src/sbin/swapon/swapon.c:246: warning: field width is not type 
>int (arg 3)
> 
> Can someone please just fix this (by backing out the offending commit,
> if necessary)?

Eek, given a 64-bit size_t, the present code leaves 32 bits of it
uninitialized in the usual case.  The following patch ought to fix
the problem; I can't make sure right now because I'm out of town.

Index: swapon.c
===================================================================
RCS file: /home/ncvs/src/sbin/swapon/swapon.c,v
retrieving revision 1.14
diff -u -r1.14 swapon.c
--- swapon.c    2002/12/28 23:39:47     1.14
+++ swapon.c    2002/12/30 05:15:54
@@ -211,7 +211,7 @@
        size_t mibsize, size;
        struct xswdev xsw;
        int mib[16], n, pagesize;
-       size_t hlen;
+       int hlen;
        long blocksize;
        long long total = 0;
        long long used = 0;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to