Hi tech,

I was debugging some webcam issues and received compiler errors when
building with the VIDEO_DEBUG option due to printf patterns in the expanded 
DPRINTF macro.

See below patch for updating the formats in the DPRINTF usage. I've tested on 
i386 and amd64.

Index: sys/dev/video.c
===================================================================
RCS file: /cvs/src/sys/dev/video.c,v
retrieving revision 1.40
diff -u -p -u -p -r1.40 video.c
--- sys/dev/video.c     3 Jul 2016 20:05:44 -0000       1.40
+++ sys/dev/video.c     10 Oct 2017 15:25:39 -0000
@@ -178,7 +178,7 @@ videoread(dev_t dev, struct uio *uio, in
                sc->sc_vidmode = VIDMODE_READ;
        }
  
-       DPRINTF(("resid=%d\n", uio->uio_resid));
+       DPRINTF(("resid=%zu\n", uio->uio_resid));
 
        if (sc->sc_frames_ready < 1) {
                /* block userland read until a frame is ready */
@@ -212,8 +212,8 @@ videoioctl(dev_t dev, u_long cmd, caddr_
            (sc = video_cd.cd_devs[unit]) == NULL || sc->hw_if == NULL)
                return (ENXIO);
 
-       DPRINTF(("video_ioctl(%d, '%c', %d)\n",
-           IOCPARM_LEN(cmd), IOCGROUP(cmd), cmd & 0xff));
+       DPRINTF(("video_ioctl(%zu, '%c', %zu)\n",
+           IOCPARM_LEN(cmd), (int) IOCGROUP(cmd), cmd & 0xff));
 
        error = EOPNOTSUPP;
        switch (cmd) {
@@ -389,7 +389,7 @@ videommap(dev_t dev, off_t off, int prot
        caddr_t p;
        paddr_t pa;
 
-       DPRINTF(("%s: off=%d, prot=%d\n", __func__, off, prot));
+       DPRINTF(("%s: off=%lld, prot=%d\n", __func__, off, prot));
 
        unit = VIDEOUNIT(dev);
        if (unit >= video_cd.cd_ndevs ||

Reply via email to