no functional change
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 71811 Build 68694: arc lint + arc unit
Event Timeline
Here, the use-case is not for a group of meaning related constants under a new identifier like enum color {red, green, blue,};.
It's anonymous. It's more like define enum SIFTR_CONSTS {HOOK = 0, UNHOOK = 1, SIFTR_DISABLE = 0, ...};, without the identifier SIFTR_CONSTS.
I understand that this helps with debugging, as ENUMs get printed as symbols. However, since these are, as Michael points out, quite unrelated to each other, and defining multiple enum identifiers may help catch incorrect assignments by the compiler, why not split the ENUM up into multiple, independently identified enums, still with explicit assignments?
The variables holding these enums can (should) be redefined as the corresponding enum type, thus possibly catching incorrect assignments - and helping which constant goes where.