Bug 156278

Summary: ainit uses char for getc() result, fills .asoundrc with 0xff until killed.
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: alsa-libAssignee: Martin Stransky <stransky>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0.9rc2-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-28 16:27:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Woodhouse 2005-04-28 16:17:44 UTC
The getc() function returns a 'int', not a 'char'. Compiling ainit on a machine
where 'char' is unsigned results in these warnings:

ainit.c: In function 'read_token':
ainit.c:194: warning: comparison is always true due to limited range of data type
ainit.c: In function 'parse_file':
ainit.c:223: warning: comparison is always true due to limited range of data type

... because a char cannot hold the value '-1'.