CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2021/03/01 08:56:00

Modified files:
        sbin/dhcpleased: engine.c 

Log message:
We really must handle all possible enumeration values in
state_transition() and iface_timeout(). Let the compiler help us by
emitting a warning when we missed one (-Wswitch).
Reminded by jsg who pointed out that gcc is quite confused and thinks
there is an out of bounds access in if_state_name[] in the default
case. There is not, if_state_name[] and enum if_state have to be kept
in sync.
(Note that -Wswitch is not a silver bullet, it just happens to work
here.)

Reply via email to