1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 23:59:37 +02:00

lib-src/twolame/libtwolame: eliminate warnings...

... cast enum to int before testing for negative value which is not in the
enumeration but signifies "undefined"
This commit is contained in:
Paul Licameli 2018-11-13 08:20:30 -05:00
parent 2fec472ba2
commit 548f221890

View File

@ -192,10 +192,10 @@ int twolame_init_params(twolame_options * glopts)
glopts->samplerate_out = glopts->samplerate_in;
}
// If the MPEG version has not been set, then choose automatically
if (glopts->version == -1) {
if ((int)glopts->version == -1) {
// Get the MPEG version for the chosen samplerate
glopts->version = twolame_get_version_for_samplerate(glopts->samplerate_out);
if (glopts->version < 0) {
if ((int)glopts->version < 0) {
fprintf(stderr, "twolame_init_params(): invalid samplerate: %i\n",
glopts->samplerate_out);
return -1;