diff options
author | Max Kellermann <max@duempel.org> | 2008-03-26 10:37:23 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:37:23 +0000 |
commit | b546bcfec63822ad3bf3ae4ee71472dfa3aac010 (patch) | |
tree | cc403adde39a933f96c89f62a7e4486c69f094be /src | |
parent | 66fe58064295f838f894758d92b087100ce022aa (diff) | |
download | mpd-b546bcfec63822ad3bf3ae4ee71472dfa3aac010.tar.gz mpd-b546bcfec63822ad3bf3ae4ee71472dfa3aac010.tar.xz mpd-b546bcfec63822ad3bf3ae4ee71472dfa3aac010.zip |
fix "unreachable code" warning
There is unreachable code at several positions, e.g. after an
#if/#end, or after an endless loop. Remove that.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7197 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/charConv.c | 4 | ||||
-rw-r--r-- | src/player.c | 2 | ||||
-rw-r--r-- | src/playlist.c | 6 | ||||
-rw-r--r-- | src/utils.c | 3 | ||||
-rw-r--r-- | src/volume.c | 1 |
5 files changed, 4 insertions, 12 deletions
diff --git a/src/charConv.c b/src/charConv.c index 895a695cd..c9a47fe1d 100644 --- a/src/charConv.c +++ b/src/charConv.c @@ -88,9 +88,9 @@ int setCharSetConversion(const char *to, const char *from) char_conv_use_iconv = 1; return 0; -#endif - +#else return -1; +#endif } char *char_conv_str(char *dest, const char *string) diff --git a/src/player.c b/src/player.c index 547b2b737..97d6e4e95 100644 --- a/src/player.c +++ b/src/player.c @@ -161,8 +161,6 @@ static int playerInit(void) } else my_usleep(10000); } - - exit(EXIT_SUCCESS); } else if (player_pid < 0) { diff --git a/src/playlist.c b/src/playlist.c index e310f5fcf..81c3ee687 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -973,8 +973,6 @@ static int currentSongInPlaylist(int fd) return playPlaylistOrderNumber(fd, playlist.current); } else return stopPlaylist(fd); - - return 0; } int nextSongInPlaylist(int fd) @@ -996,8 +994,6 @@ int nextSongInPlaylist(int fd) incrPlaylistCurrent(); return stopPlaylist(fd); } - - return 0; } void playPlaylistIfPlayerStopped(void) @@ -1270,8 +1266,6 @@ int previousSongInPlaylist(int fd) return playPlaylistOrderNumber(fd, playlist.current); } } - - return 0; } int shufflePlaylist(int fd) diff --git a/src/utils.c b/src/utils.c index 2a0fcf89d..8f18a80ff 100644 --- a/src/utils.c +++ b/src/utils.c @@ -76,8 +76,9 @@ int ipv6Supported(void) return 0; close(s); return 1; -#endif +#else return 0; +#endif } char *appendToString(char *dest, const char *src) diff --git a/src/volume.c b/src/volume.c index 846a76eaa..36656c272 100644 --- a/src/volume.c +++ b/src/volume.c @@ -510,7 +510,6 @@ int changeVolumeLevel(int fd, int change, int rel) return changeSoftwareVolume(fd, change, rel); default: return 0; - break; } } |