From 72109189a67d9fe19fb88dc744a999e2d21ff591 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 4 May 2013 18:13:56 +0200 Subject: [PATCH] aacdec: Fix check of return value of NeAACDecInit2(). This function returns (char)-1 on errors and zero on success. Checking whether the return value is negative is incorrect on systems where char is unsigned. On raspberry/ARM, gcc complains: aacdec_filter.c:126:6: warning: comparison is always false due to limited range of data type [-Wtype-limits] Fix this by checking agains zero instead. --- aacdec_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aacdec_filter.c b/aacdec_filter.c index 55f7ea25..79e66620 100644 --- a/aacdec_filter.c +++ b/aacdec_filter.c @@ -123,7 +123,7 @@ next_buffer: ret = -E_AACDEC_INIT; if (NeAACDecInit2(padd->handle, p, padd->decoder_length, &rate, - &channels) < 0) + &channels) != 0) goto out; } padd->sample_rate = rate; -- 2.39.5