Subject: lib/24127: `audio_wav_parse_hdr' differ in signedness
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <ole.hellqvist@spray.se>
List: netbsd-bugs
Date: 01/17/2004 12:00:51
>Number:         24127
>Category:       lib
>Synopsis:       `audio_wav_parse_hdr' differ in signedness
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 17 12:01:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ole
>Release:        current
>Organization:
home
>Environment:
NetBSD duron 1.6ZF NetBSD 1.6ZF (MYDURON) #0: Sun Nov 30 14:23:12 CET 2003  ole@duron:/usr/src/sys/arch/i386/compile/MYDURON i386
>Description:
I'm reusing the code from the audioplay sourcefile "play.c".
When compiling i get the error: 
" `audio_wav_parse_hdr' differ in signedness"
>How-To-Repeat:
 cc -O2 -Wall -pedantic -c play.c
>Fix:
Making changes as described in diff output below helps!
The bug is not just limited to this function, more or less all int and
u_int's in the lib are mixed up.
--------------------------------------------- 
duron: {156} diff play/common/wav.c wav.c
97,100c97,100
<       int     *enc;
<       int     *prec;
<       int     *sample;
<       int     *channels;
---
>       u_int   *enc;
>       u_int   *prec;
>       u_int   *sample;
>       u_int   *channels;
duron: {158} diff play/common/libaudio.h libaudio.h
142c142
< ssize_t audio_wav_parse_hdr (void *, size_t, int *, int *, int *, int *, size_t *);
---
> ssize_t audio_wav_parse_hdr (void *, size_t, u_int *, u_int *, u_int *, u_int *, size_t *);
 

>Release-Note:
>Audit-Trail:
>Unformatted: