Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Adapt to compiling with -Wcast-qual by adding con...



details:   https://anonhg.NetBSD.org/src/rev/d027fcd182cb
branches:  trunk
changeset: 581870:d027fcd182cb
user:      he <he%NetBSD.org@localhost>
date:      Wed Jun 08 13:54:38 2005 +0000

description:
Adapt to compiling with -Wcast-qual by adding const to some pointer casts.

diffstat:

 sys/dev/ic/msm6258.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 45dbee18509c -r d027fcd182cb sys/dev/ic/msm6258.c
--- a/sys/dev/ic/msm6258.c      Wed Jun 08 11:55:29 2005 +0000
+++ b/sys/dev/ic/msm6258.c      Wed Jun 08 13:54:38 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msm6258.c,v 1.12 2005/01/10 22:01:37 kent Exp $        */
+/*     $NetBSD: msm6258.c,v 1.13 2005/06/08 13:54:38 he Exp $  */
 
 /*
  * Copyright (c) 2001 Tetsuya Isaki. All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msm6258.c,v 1.12 2005/01/10 22:01:37 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msm6258.c,v 1.13 2005/06/08 13:54:38 he Exp $");
 
 #include <sys/systm.h>
 #include <sys/device.h>
@@ -166,10 +166,10 @@
                        uint8_t f;
                        int16_t ss;
 #if BYTE_ORDER == LITTLE_ENDIAN
-                       ss = *(int16_t*)s;
+                       ss = *(const int16_t*)s;
                        s = audio_stream_add_outp(this->src, s, 2);
                        f  = pcm2adpcm_step(mc, ss);
-                       ss = *(int16_t*)s;
+                       ss = *(const int16_t*)s;
 #else
                        ss = (s[1] << 8) | s[0];
                        s = audio_stream_add_outp(this->src, s, 2);
@@ -186,10 +186,10 @@
                        uint8_t f;
                        int16_t ss;
 #if BYTE_ORDER == BIG_ENDIAN
-                       ss = *(int16_t*)s;
+                       ss = *(const int16_t*)s;
                        s = audio_stream_add_outp(this->src, s, 2);
                        f  = pcm2adpcm_step(mc, ss);
-                       ss = *(int16_t*)s;
+                       ss = *(const int16_t*)s;
 #else
                        ss = (s[0] << 8) | s[1];
                        s = audio_stream_add_outp(this->src, s, 2);



Home | Main Index | Thread Index | Old Index