From 548f221890573c7951fd5dc75477950b983190d5 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 13 Nov 2018 08:20:30 -0500 Subject: [PATCH] lib-src/twolame/libtwolame: eliminate warnings... ... cast enum to int before testing for negative value which is not in the enumeration but signifies "undefined" --- lib-src/twolame/libtwolame/twolame.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-src/twolame/libtwolame/twolame.c b/lib-src/twolame/libtwolame/twolame.c index fa4bcc083..e1312a458 100644 --- a/lib-src/twolame/libtwolame/twolame.c +++ b/lib-src/twolame/libtwolame/twolame.c @@ -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;