From e34b5eaa7603d659b794c430359e64b45d791606 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 10 Feb 2015 14:47:36 +0100 Subject: Fix unused warning --- src/ufodecode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ufodecode.c') diff --git a/src/ufodecode.c b/src/ufodecode.c index 9f5851a..66db000 100644 --- a/src/ufodecode.c +++ b/src/ufodecode.c @@ -135,6 +135,9 @@ ufo_decode_frame_channels_v0(UfoDecoder *decoder, const size_t cpi = num_rows * cpl; int pos = 0; uint32_t data; +#if defined(DEBUG) || defined(CHECKS) + int err; +#endif #if defined(HAVE_SSE) && !defined(DEBUG) __m128i mask = _mm_set_epi32(0x3FF, 0x3FF, 0x3FF, 0x3FF); @@ -159,7 +162,6 @@ ufo_decode_frame_channels_v0(UfoDecoder *decoder, #ifdef CHECKS int header = (info >> 30) & 0x03; const int bpp = (info >> 16) & 0x0F; - int err; CHECK_FLAG("raw header magick", header == 2, header); CHECK_FLAG("row number, only %i rows requested", row < num_rows, row, num_rows); CHECK_FLAG("pixel size, only 10 bits are supported", bpp == 10, bpp); @@ -241,6 +243,9 @@ ufo_decode_frame_channels_v0(UfoDecoder *decoder, header = (data >> 30) & 0x03; CHECK_FLAG("raw data magic", header == 3, header); CHECK_FLAG("raw footer magic", (data & 0x3FF) == 0x55, (data & 0x3FF)); +#endif + +#if defined(DEBUG) || defined(CHECKS) if (err) return err; #endif -- cgit v1.2.3