Skip to content

Commit

Permalink
removed a few bogus asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Mar 20, 2021
1 parent 5b774c1 commit e0fc87b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
9 changes: 3 additions & 6 deletions src/SDL_sound_aiff.c
Expand Up @@ -380,14 +380,11 @@ static int read_fmt(SDL_RWops *rw, comm_t *c, fmt_t *fmt)

/* add other types here. */

default:
SNDDBG(("AIFF: Format %lu is unknown.\n",
(unsigned int) fmt->type));
BAIL_MACRO("AIFF: Unsupported format", 0);
} /* switch */

SDL_assert(0); /* shouldn't hit this point. */
return 0;
SNDDBG(("AIFF: Format %u is unknown.\n",
(unsigned int) fmt->type));
BAIL_MACRO("AIFF: Unsupported format", 0);
} /* read_fmt */


Expand Down
2 changes: 0 additions & 2 deletions src/SDL_sound_shn.c
Expand Up @@ -1025,8 +1025,6 @@ static Uint32 SHN_read(Sound_Sample *sample)
shn_t *shn = (shn_t *) internal->decoder_private;
Sint32 cmd;

SDL_assert(shn->backBufLeft >= 0);

/* see if there are leftovers to copy... */
if (shn->backBufLeft > 0)
{
Expand Down
9 changes: 3 additions & 6 deletions src/SDL_sound_wav.c
Expand Up @@ -599,14 +599,11 @@ static int read_fmt(SDL_RWops *rw, fmt_t *fmt)

/* add other types here. */

default:
SNDDBG(("WAV: Format 0x%X is unknown.\n",
(unsigned int) fmt->wFormatTag));
BAIL_MACRO("WAV: Unsupported format", 0);
} /* switch */

SDL_assert(0); /* shouldn't hit this point. */
return 0;
SNDDBG(("WAV: Format 0x%X is unknown.\n",
(unsigned int) fmt->wFormatTag));
BAIL_MACRO("WAV: Unsupported format", 0);
} /* read_fmt */


Expand Down

0 comments on commit e0fc87b

Please sign in to comment.