• Poul-Henning Kamp's avatar
    In C enums are integertyped, but it is up to the compiler to decide · e4ce8c01
    Poul-Henning Kamp authored
    if they are signed or unsigned.
    
    Range-check enums is sound programming practice, but that concept
    seems to be beyond the imagination of certain compiler people:
    
       vhp_decode.c:96:2: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
    
    Add a dummy "MIN" value to the enum, give it value -1 to force
    the compiler to use signed ints for the enum, and then check
    that they're never negative.
    e4ce8c01
Name
Last commit
Last update
..
vhp.h Loading commit data...
vhp_decode.c Loading commit data...
vhp_gen_hufdec.c Loading commit data...
vhp_table.c Loading commit data...