[libdvbpsi-devel] Compilation of libdvbpsi fails on GCC 5.1.0 with --enable-debug
Daniel Kamil Kozar
dkk089 at gmail.com
Tue May 26 22:35:05 CEST 2015
Hello all,
Compilation of libdvbpsi with GCC 5.1.0 fails due to the following error :
test_dr.c: In function ‘main_vstream_1’:
test_dr.h:106:39: error: comparison of constant ‘12’ with boolean
expression is always true [-Werror=bool-compare]
} while(!i_err && (s_decoded.name <= 12)); \
^
test_dr.c:49:3: note: in expansion of macro ‘BOZO_end_boolean’
BOZO_end_boolean(b_multiple_frame_rate)
^
I have to admit that I don't fully understand the intention of the
original code. The macro, when expanded, yields the following result :
s_decoded.b_multiple_frame_rate += 12;
} while(!i_err && (s_decoded.b_multiple_frame_rate <= 12));
Where 'b_multiple_frame_rate' is a variable of type bool. Compiling
the code with -Werror disabled causes the code to be compiled into an
infinite loop.
What is the intention of incrementing a bool value by 12 and then
comparing that bool with an integer value?
Kind regards,
Daniel
More information about the libdvbpsi-devel
mailing list