fix gcc-2.95 compilation errors

git-svn-id: https://svn.musicpd.org/mpd/trunk@172 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-03-03 00:01:43 +00:00
parent 4aec92fd6e
commit ac2be01374
3 changed files with 8 additions and 4 deletions

View File

@ -199,8 +199,9 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af, int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af,
DecoderControl * dc) { DecoderControl * dc) {
int pid;
decode_pid = &(pc->decode_pid); decode_pid = &(pc->decode_pid);
int pid = fork(); pid = fork();
if(pid==0) { if(pid==0) {
/* CHILD */ /* CHILD */

View File

@ -69,7 +69,6 @@ unsigned int parsePermissions(char * string) {
} }
void initPermissions() { void initPermissions() {
permission_passwords = makeList(free);
char * passwordSets; char * passwordSets;
char * nextSet; char * nextSet;
char * temp; char * temp;
@ -78,6 +77,8 @@ void initPermissions() {
char * password; char * password;
unsigned int * permission; unsigned int * permission;
permission_passwords = makeList(free);
permission_default = PERMISSION_READ | PERMISSION_ADD | permission_default = PERMISSION_READ | PERMISSION_ADD |
PERMISSION_CONTROL | PERMISSION_ADMIN; PERMISSION_CONTROL | PERMISSION_ADMIN;

View File

@ -402,17 +402,19 @@ float getPlayerCrossFade() {
} }
void setPlayerCrossFade(float crossFadeInSeconds) { void setPlayerCrossFade(float crossFadeInSeconds) {
PlayerControl * pc;
if(crossFadeInSeconds<0) crossFadeInSeconds = 0; if(crossFadeInSeconds<0) crossFadeInSeconds = 0;
PlayerControl * pc = &(getPlayerData()->playerControl); pc = &(getPlayerData()->playerControl);
pc->crossFade = crossFadeInSeconds; pc->crossFade = crossFadeInSeconds;
} }
void setPlayerSoftwareVolume(int volume) { void setPlayerSoftwareVolume(int volume) {
PlayerControl * pc;
volume = (volume>100) ? 100 : (volume<0 ? 0 : volume); volume = (volume>100) ? 100 : (volume<0 ? 0 : volume);
PlayerControl * pc = &(getPlayerData()->playerControl); pc = &(getPlayerData()->playerControl);
pc->softwareVolume = volume; pc->softwareVolume = volume;
} }