> -----Original Message-----
> Looking further, I also notice that 'enum rdma_cm_event_type' does not
> initialize a single value. AFAIK, according to the C standard at least
> the first value has to be initialized, otherwise the compiler is free to
> assign random values. This is certainly fine for in-kernel enums,
> however, as kernel and user space need to use the same numbers this
> probably should be improved. Shall I write a patch, assigning the first
> value to 0 for kernel and lib definitions?


In a draft of the C specification (all I have handy), section 6.5.2.2  
Enumeration specifiers, says:

... 
If the first enumerator has no =, the value  of its  enumeration  constant is 0.
...


Dean

Reply via email to