DragonFly BSD
DragonFly submit List (threaded) for 2005-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: dmesg WARNS6 cleanup


From: Chris Pressey <cpressey@xxxxxxxxxxxxxxx>
Date: Thu, 13 Jan 2005 22:45:25 -0800

Committed, thanks!

-Chris

On Sun, 16 Jan 2005 03:21:38 -0500
Larry Lansing <lansil@xxxxxxxxxxxxx> wrote:

> Index: Makefile
> ===================================================================
> RCS file: /home/dcvs/src/sbin/dmesg/Makefile,v
> retrieving revision 1.2
> diff -u -r1.2 Makefile
> --- Makefile	17 Jun 2003 04:27:32 -0000	1.2
> +++ Makefile	16 Jan 2005 02:52:42 -0000
> @@ -3,6 +3,7 @@
>  # $DragonFly: src/sbin/dmesg/Makefile,v 1.2 2003/06/17 04:27:32 dillon Exp $
>  
>  PROG=	dmesg
> +WARNS?=	6
>  MAN=	dmesg.8
>  LDADD=	-lkvm
>  DPADD=	${LIBKVM}
> Index: dmesg.c
> ===================================================================
> RCS file: /home/dcvs/src/sbin/dmesg/dmesg.c,v
> retrieving revision 1.6
> diff -u -r1.6 dmesg.c
> --- dmesg.c	18 Dec 2004 21:43:38 -0000	1.6
> +++ dmesg.c	16 Jan 2005 07:44:36 -0000
> @@ -50,10 +50,11 @@
>  #include <vis.h>
>  #include <sys/syslog.h>
>  
> -struct nlist nl[] = {
>  #define	X_MSGBUF	0
> -	{ "_msgbufp" },
> -	{ NULL },
> +
> +struct nlist nl[] = {
> +	{ "_msgbufp", 0, 0, 0, 0 },
> +	{ NULL, 0, 0, 0, 0 },
>  };
>  
>  void usage(void);
> @@ -73,7 +74,7 @@
>  	int all = 0;
>  	int pri = 0;
>  	size_t buflen;
> -	int bufpos;
> +	size_t bufpos;
>  
>  	setlocale(LC_CTYPE, "");
>  	memf = nlistf = NULL;
> @@ -124,7 +125,7 @@
>  		if (!bp)
>  			errx(1, "malloc failed");
>  		if (kvm_read(kd, (long)cur.msg_ptr, bp, cur.msg_size) !=
> -		    cur.msg_size)
> +		    (ssize_t)cur.msg_size)
>  			errx(1, "kvm_read: %s", kvm_geterr(kd));
>  		kvm_close(kd);
>  		buflen = cur.msg_size;
> 



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]