Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa Code enabled by option AUDIO_DEBUG exhibited und...



details:   https://anonhg.NetBSD.org/src/rev/129f31c26cc3
branches:  trunk
changeset: 555552:129f31c26cc3
user:      gson <gson%NetBSD.org@localhost>
date:      Fri Nov 21 03:08:37 2003 +0000

description:
Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.

diffstat:

 sys/dev/isa/gus.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 5e15d1b051d1 -r 129f31c26cc3 sys/dev/isa/gus.c
--- a/sys/dev/isa/gus.c Fri Nov 21 00:25:36 2003 +0000
+++ b/sys/dev/isa/gus.c Fri Nov 21 03:08:37 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gus.c,v 1.81 2003/05/09 23:51:29 fvdl Exp $    */
+/*     $NetBSD: gus.c,v 1.82 2003/11/21 03:08:37 gson Exp $    */
 
 /*-
  * Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.81 2003/05/09 23:51:29 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.82 2003/11/21 03:08:37 gson Exp $");
 
 #include "gus.h"
 #if NGUS > 0
@@ -1243,7 +1243,7 @@
       dmarecords[dmarecord_index].count = sa->size;
       dmarecords[dmarecord_index].channel = 1;
       dmarecords[dmarecord_index].direction = 1;
-      dmarecord_index = ++dmarecord_index % NDMARECS;
+      dmarecord_index = (dmarecord_index + 1) % NDMARECS;
     }
 #endif
 
@@ -1337,7 +1337,7 @@
          dmarecords[dmarecord_index].count = size;
          dmarecords[dmarecord_index].channel = 0;
          dmarecords[dmarecord_index].direction = 1;
-         dmarecord_index = ++dmarecord_index % NDMARECS;
+         dmarecord_index = (dmarecord_index + 1) % NDMARECS;
        }
 #endif
 
@@ -1638,7 +1638,7 @@
                  playstats[playcntr].dmabuf = sc->sc_dmabuf;
                  playstats[playcntr].bufcnt = sc->sc_bufcnt;
                  playstats[playcntr].curaddr = gus_get_curaddr(sc, GUS_VOICE_LEFT);
-                 playcntr = ++playcntr % NDMARECS;
+                 playcntr = (playcntr + 1) % NDMARECS;
                }
 #endif
                bus_space_write_1(iot, ioh2, GUS_VOICE_SELECT, GUS_VOICE_LEFT);
@@ -1880,7 +1880,7 @@
                playstats[playcntr].dmabuf = sc->sc_dmabuf;
                playstats[playcntr].bufcnt = sc->sc_bufcnt;
                playstats[playcntr].vaction = 5;
-               playcntr = ++playcntr % NDMARECS;
+               playcntr = (playcntr + 1) % NDMARECS;
        }
 #endif
 
@@ -1978,7 +1978,7 @@
                playstats[playcntr].playbuf = sc->sc_playbuf;
                playstats[playcntr].dmabuf = sc->sc_dmabuf;
                playstats[playcntr].bufcnt = sc->sc_bufcnt;
-               playcntr = ++playcntr % NDMARECS;
+               playcntr = (playcntr + 1) % NDMARECS;
        }
 #endif
 



Home | Main Index | Thread Index | Old Index