• 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
.github Loading commit data...
bin Loading commit data...
devscripts Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
.gitignore Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.inc.phk Loading commit data...
Makefile.phk Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
config.phk Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...