libkvm: Raise WARNS to 2 and fix warnings.
authorSascha Wildner <saw@online.de>
Sat, 23 May 2009 11:05:57 +0000 (13:05 +0200)
committerSascha Wildner <saw@online.de>
Sat, 23 May 2009 11:06:52 +0000 (13:06 +0200)
Includes adding a prototype for dev2udev() to kern_kinfo.c if compiled
for userland.

lib/libkvm/Makefile
lib/libkvm/kvm_amd64.c
lib/libkvm/kvm_i386.c
sys/kern/kern_kinfo.c

index 012b433..2da0320 100644 (file)
@@ -2,7 +2,7 @@
 # $FreeBSD: src/lib/libkvm/Makefile,v 1.9.2.1 2001/04/25 10:04:32 ru Exp $
 # $DragonFly: src/lib/libkvm/Makefile,v 1.6 2008/10/28 17:23:45 swildner Exp $
 
-SYSDIR=        ${.CURDIR}/../../sys/
+SYSDIR=        ${.CURDIR}/../../sys
 .PATH: ${SYSDIR}/kern
 
 LIB=   kvm
@@ -11,6 +11,7 @@ SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_file.c kvm_getloadavg.c \
        kvm_getswapinfo.c kvm_proc.c kvm_util.c \
        kern_kinfo.c
 INCS=  kvm.h
+WARNS?=        2
 
 MAN=   kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getprocs.3 \
        kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 kvm_read.3
index d832497..9e945c6 100644 (file)
@@ -136,7 +136,6 @@ _kvm_vatop(kvm_t *kd, u_long va, u_long *pa)
        pt_entry_t pte;
        u_long pdeindex;
        u_long pteindex;
-       int i;
 
        if (kvm_ishost(kd)) {
                _kvm_err(kd, 0, "vatop called in live kernel!");
index 5345456..9f57168 100644 (file)
@@ -136,7 +136,6 @@ _kvm_vatop(kvm_t *kd, u_long va, u_long *pa)
        pt_entry_t pte;
        u_long pdeindex;
        u_long pteindex;
-       int i;
 
        if (kvm_ishost(kd)) {
                _kvm_err(kd, 0, "vatop called in live kernel!");
index 5e5e4dd..c8d0578 100644 (file)
@@ -54,6 +54,8 @@
 #include <sys/systm.h>
 #else
 #include <string.h>
+
+dev_t dev2udev(cdev_t dev);    /* kvm_proc.c */
 #endif