barnson / miniz

Automatically exported from code.google.com/p/miniz
1 stars 1 forks source link

enumeral and non-enumeral type in conditional expression #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile with -Wall
2. calls from MZ_MIN and MZ_MAX with different var types like in dict_size = 
MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE);

What is the expected output? What do you see instead?
expected are no warning, but i got the warning "enumeral and non-enumeral type 
in conditional expression [enabled by default]"

What version of the product are you using? On what operating system?
1.15r4 with qt 5.0.2 on win7 64bit

Please provide any additional information below.
solved issue with explcit cast. i.e. dict_size = MZ_MIN(dict_size + 
cur_match_len, (mz_uint)TDEFL_LZ_DICT_SIZE);

Original issue reported on code.google.com by dragon...@googlemail.com on 10 Dec 2013 at 5:00